<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Mar 21, 2019 at 8:12 AM David Chisnall <<a href="mailto:David.Chisnall@cl.cam.ac.uk">David.Chisnall@cl.cam.ac.uk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 20 Mar 2019, at 18:23, Arthur O'Dwyer via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> Server-side hooks are the answer to this problem. There is no problem. You just use a server-side hook.<br>
<br>
It is quite unlikely that GitHub will allow LLVM (or any other project) to run arbitrary post-receive hooks.  It is far more likely that they will give an option that disables the merge button in PRs.  It is already possible to prevent direct pushes to master by anyone, so this would be a very small change (literally disabling one button in the UI).  <br></blockquote><div><br></div><div>Disabling (or really, changing the semantics of) the merge button is actually a standard project setting for all GitHub projects, even personal ones. You find it under "Settings" here: <a href="https://i.imgur.com/w5zmNra.png">https://i.imgur.com/w5zmNra.png</a></div><div>However, the solution to the LLVM project's problem is a server-side pre-receive hook.</div><div><br></div><div>See this Twitter thread:</div><div><a href="https://twitter.com/jessfraz/status/1086475273036578816">https://twitter.com/jessfraz/status/1086475273036578816</a><br></div><div><br></div><div>I'm looping in Chandler, since he seems to be the person who's already talked to GitHub staff about LLVM's needs. Chandler, have you discussed with them</div><div>- how to prevent accidental non-fast-forward merge commits</div><div>- installing server-side hooks</div><div>?</div><div><br></div><div>Thanks much,</div><div>–Arthur</div></div></div></div></div>