Skip to content

Commit 93a65f7

Browse files
author
Tom Osowski
authored
Merge pull request #132 from osowskit/master
Minor fixes to block self merge hook
2 parents 0424962 + 3795262 commit 93a65f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-receive-hooks/block_self_merge_prs.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# https://help.github.com/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-appliance/
99
#
1010

11-
if [[ "$GITHUB_VIA" = "merge api" ]] && [[ "$GITHUB_PULL_REQUEST_AUTHOR_LOGIN" = "$GITHUB_USER_LOGIN" ]]; then
11+
if [[ "$GITHUB_VIA" = *"merge"* ]] && [[ "$GITHUB_PULL_REQUEST_AUTHOR_LOGIN" = "$GITHUB_USER_LOGIN" ]]; then
1212
echo "Blocking merging of your own pull request."
1313
exit 1
1414
fi

0 commit comments

Comments
 (0)