<div dir="ltr">This is one of the reasons everyone having write access is not a great workflow. For my other projects I set the push URL for upstream to DISABLED and then have a custom "sudo" <a href="https://gist.github.com/GMNGeoffrey/a1a2cc1baf811ce4ebcdeab6c24e8a2d">git command</a> that resets the URL. This doesn't work well with arc though, so I don't use it for LLVM. If we switched to GItHub PRs, then everything could be forced to go through a PR, but this requires additional automation (the only way for someone to merge PRs is also for them to have write access).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 7, 2021 at 4:22 AM Mara Sophie Grosch via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What about the action opening an issue for the bad branch and when that<br>
issue is 7 days old without someone closing it ("that branch is ok"),<br>
another (periodic) action then removes the branch?<br>
<br>
That would do the expected thing automatically, but with a visible delay<br>
to make it less dangerous. Also, the branches would only be lost on<br>
GitHub and still be available on the computer someone pushed them from -<br>
not perfectly safe, but better than "automatically lost forever".<br>
<br>
Of course only viable once issues are migrated to Github, otherwise it's<br>
chaos the people doing that migration surely wouldn't like ^^'<br>
<br>
Am Sat, Nov 06, 2021 at 09:46:46PM +0300 schrieb Anton Korobeynikov:<br>
>Unfortunately, GitHub does not allow this kind of "protection". Only<br>
>existing branches can be protected from pushes.<br>
>We already had such issues in the past when the outdated "master"<br>
>branch was pushed into the repo after the "master => main" transition.<br>
>We reported the issue to GitHub ~year ago, but this might be included<br>
>into their roadmap for 2023 or so.<br>
><br>
>We've been told that the "workaround" is an action that removes all<br>
>non-known branches, however, I'm a little bit hesitant on having such<br>
>kind of powerful automation, that could remove something from the<br>
>repo.<br>
><br>
>On Sat, Nov 6, 2021 at 3:56 AM Mara Sophie Grosch via llvm-dev<br>
><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> This happening was actually a big fear for me when I got commit access, especially since I'm working on a fork for my hobby osdev project, not at all ready for upstreaming it - one wrong git push away<br>
>><br>
>> Seeing this happening to other people is a bit of a relief<br>
>><br>
>> Is it possible to configure GitHub to forbid that? Like everything except the normal branches being protected from pushes?<br>
>><br>
>> Mara<br>
>><br>
>> Am 6. November 2021 00:48:49 UTC schrieb Luke Benes via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
>> >A branch containing the D112590 patch was accidentally pushed to GitHub: <a href="https://github.com/llvm/llvm-project/tree/efb284c07e" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/tree/efb284c07e</a><br>
>> ><br>
>> >In the past couple of weeks, this also happened for<br>
>> ><a href="https://reviews.llvm.org/D107347" rel="noreferrer" target="_blank">https://reviews.llvm.org/D107347</a><br>
>> >and<br>
>> ><a href="https://reviews.llvm.org/D108319" rel="noreferrer" target="_blank">https://reviews.llvm.org/D108319</a><br>
>> ><br>
>> >This seems to be happening a lot recently. Is there a problem with the instructions to commit patches?<br>
>> ><br>
>> >_______________________________________________<br>
>> >LLVM Developers mailing list<br>
>> ><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> ><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
>><br>
>> --<br>
>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.<br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
><br>
>--<br>
>With best regards, Anton Korobeynikov<br>
>Department of Statistical Modelling, Saint Petersburg State University<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>