[llvm-dev] GitHub Hooks

Matthias Braun via llvm-dev
Tue, 19 Jul 2016 21:09:51 -0000

> On Jul 19, 2016, at 1:27 PM, Renato Golin via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> So, there's been a bit of a misunderstanding about the hooks that are
> supported in GitHub, and after talking to the GitHub staff, I'd like
> to clarify what they are and how we can use them.
>
>
>  1. Pre-commit hooks, avoiding forced pushes / re-order
>
> GitHub doesn't support server hooks due to security concerns.
>
> But there is an alternative:
>
> https://help.github.com/articles/about-required-status-checks/
>
> I don't know how we'd check for non-ff-merges with this, and
I'd
> appreciate if someone with better GitHub knowledge could chime in. But
> they *do* stop pushes from going in, which is what we want. Maybe we
> would need a web-service (see 2) to get this working.
>
> How does Swift solve this? Do we really need a linear history on the
> projects, or just on the umbrella project?

Just to repeat what I said earlier I consider linear history an important
feature!

About the status checks: This sounds like we have to setup some buildbot/jenkins
instance that reacts when pull requests are created with a simple job
that checks linear history, commit date for us and then marks the commit as good
to push as the last step (or pushes it automatically).
(We could extend this later to more advanced pre-commit sanity checking like
checking whether stuff compiles etc...)
This will be work we have to do.

>
>
> 2. Post-commit umbrella updates
>
> We can use webhooks:
>
> https://developer.github.com/webhooks/
>
> This would hit some webpage / buildbot and make them update the
> llvm-projects (with sub-modules) via git.
>
> We'd be required to maintain a piece of web service somewhere, but the
> maintenance of that web-service will be a lot less than the current
> SVN/Git servers.
>
>
> 3. Post-commit email, for review/history
>
> We can use email Webhooks:
>
>
https://help.github.com/articles/managing-notifications-for-pushes-to-a-repository/
>
> This would be enabled on all projects except the umbrella, so we can
> continue to make post-commit review.
>
>
> I believe 2 and 3 should be reasonably easy to set up, but I'm not
> sure about 1. It looks like it could work, but this is really a GitHub
> thing more than a Git thing.
>
> Any ideas?
>
> cheers,
> -renato
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev