[cfe-dev] [lldb-dev] [GitHub] RFC: Enforcing no merge commit policy

Arthur O'Dwyer via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 21 07:46:34 PDT 2019


On Thu, Mar 21, 2019 at 8:12 AM David Chisnall <David.Chisnall at cl.cam.ac.uk>
wrote:

> On 20 Mar 2019, at 18:23, Arthur O'Dwyer via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> >
> > Server-side hooks are the answer to this problem. There is no problem.
> You just use a server-side hook.
>
> 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).
>

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: https://i.imgur.com/w5zmNra.png
However, the solution to the LLVM project's problem is a server-side
pre-receive hook.

See this Twitter thread:
https://twitter.com/jessfraz/status/1086475273036578816

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
- how to prevent accidental non-fast-forward merge commits
- installing server-side hooks
?

Thanks much,
–Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190321/9ce2cce5/attachment.html>


More information about the cfe-dev mailing list