-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure GitHub repository to block merge commits #41774
Comments
assigned to @tstellar |
Hi Tom, I am a bit out of context since I did not closely follow the Github related discussions, but I have a question. As far as I understand, the status check is only possible within a pull request, i.e. there is nothing that will stop me from pushing a merge commit directly to the master. Does it mean that LLVM will follow PR-only policy on Github and forbid direct pushes to the master branch? I would appreciate if you can share a bit more information. Thank you, |
You can enforce status checks on commits that are pushed directly to the github repository. The plan is to update the git-llvm script to check for merge commits before pushing and to 'pass' the status check via the github API. We are not going to start using GitHub pull requests, at least not in the near future. |
Status checks are enabled in the github repository now, and all commits are required to pass the 'rebased' check. |
Why does this require the "Status Checks" feature of GitHub? Does unchecking GitHub's "Allow merge commits" not work? What happens? |
Never mind. That feature only changes their web interface, not all branches in a project. |
Hi Tom –
|
The plan is to use GitHub's status check feature[1] to block merge commits. We have created a 'rebased' status check and the git-llvm script will be updated to 1) check for a merge commit before pushing and the 2) 'Pass' the status check for the commit before pushing. Using the status checks will force people to use the git-llvm script, so we can ensure that people are running the client-side checks e committing. The goal is to prevent people from accidental merge commits and to prevent people who don't know the policy from doing merge commits. |
Extended Description
This will be implemented using status checks. Any commit that is pushed to github will be required to have the 'rebased' status check pass.
The text was updated successfully, but these errors were encountered: