Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd first version of "block skip checks" hook #222
Conversation
| ERROR_MSG="[POLICY] Skipping checks is not allowed. Please remove trailer lines with \"skip-checks: true\"." | ||
|
|
||
| while read OLDREV NEWREV REFNAME ; do | ||
| for COMMIT in `git rev-list $OLDREV..$NEWREV`; |
This comment has been minimized.
This comment has been minimized.
larsxschneider
Dec 11, 2018
Member
I think this call would fail if you push a new branch as $OLDREV is 40 zeros in that case. See https://github.com/github/platform-samples/blob/master/pre-receive-hooks/block_confidentials.sh#L38
This comment has been minimized.
This comment has been minimized.
jonico
Dec 12, 2018
Contributor
I would also wonder whether you like to recheck all commits again if somebody was copying a branch and pushing it again with a new commit on top, have a look at https://github.com/github/platform-samples/blob/master/pre-receive-hooks/block_unsigned_commits.sh#L15-L42 for an example how to exclude commits already in the repo
|
This looks promising. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
steffen commentedDec 11, 2018
This hook disallows skipping status checks.
It's basically disabling this feature:
https://help.github.com/articles/about-status-checks/#skipping-and-requesting-checks-for-individual-commits