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`; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
stoe
left a comment
There was a problem hiding this comment.
This looks promising.
Only thing it doesn’t handle is pushes that create a new branch, zero sha.
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