[llvm-dev] GitHub Hooks

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 19 13:44:44 PDT 2016

> 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/

Does this require submitting a PR for each commit?

> 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?

It doesn't, we use a pull request model.

It's encouraged to run the CI on a PR before merging but not mandatory.

Committing to the repo directly (without going through a PR) is possible.

> Do we really need a linear history on the
> projects, or just on the umbrella project?

I, for one, am in favor of maintaining a linear history in all the sub-projects.

> 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.

So the web-service will maintain a canonical set of repos with linear history?

If so, + 1.


> 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

More information about the llvm-dev mailing list