David Chisnall via llvm-dev
2019-Mar-21 12:12 UTC
[llvm-dev] [cfe-dev] [lldb-dev] [GitHub] RFC: Enforcing no merge commit policy
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). David
Philip Pfaffe via llvm-dev
2019-Mar-21 12:22 UTC
[llvm-dev] [cfe-dev] [lldb-dev] [GitHub] RFC: Enforcing no merge commit policy
On Thu, Mar 21, 2019 at 1:13 PM David Chisnall via cfe-dev < cfe-dev at lists.llvm.org> wrote:> 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). >When the goal is to have a linear history that's not quite sufficient though. We do not only want to prevent someone from merging commits through the UI, but also from merging commits offline and then pushing the merge. Cheers, Philip> > David > > > _______________________________________________ > cfe-dev mailing list > cfe-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190321/9bc44208/attachment.html>
Arthur O'Dwyer via llvm-dev
2019-Mar-21 14:46 UTC
[llvm-dev] [cfe-dev] [lldb-dev] [GitHub] RFC: Enforcing no merge commit policy
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/llvm-dev/attachments/20190321/9ce2cce5/attachment.html>
Pavel Labath via llvm-dev
2019-Mar-21 17:32 UTC
[llvm-dev] [lldb-dev] [cfe-dev] [GitHub] RFC: Enforcing no merge commit policy
On 21/03/2019 13:12, David Chisnall via lldb-dev 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.What about a single, simple, specific post-receive hook that has been vetted by the github team, and that cannot by changed from the LLVM side without going through their customer support team (and additional vetting)?
Tom Stellard via llvm-dev
2019-Mar-21 17:48 UTC
[llvm-dev] [lldb-dev] [cfe-dev] [GitHub] RFC: Enforcing no merge commit policy
On 03/21/2019 10:32 AM, Pavel Labath via llvm-dev wrote:> On 21/03/2019 13:12, David Chisnall via lldb-dev 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. > > What about a single, simple, specific post-receive hook that has been vetted by the github team, and that cannot by changed from the LLVM side without going through their customer support team (and additional vetting)?GitHub already has something like this, called branch protections[1]. There just isn't a 'no merge commit' protection, but this is something I'm going to request. -Tom [1] https://help.github.com/en/articles/configuring-protected-branches> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev