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

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

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