We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0424962 + 3795262 commit 93a65f7Copy full SHA for 93a65f7
pre-receive-hooks/block_self_merge_prs.sh
100644
100755
@@ -8,7 +8,7 @@
8
# https://help.github.com/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-appliance/
9
#
10
11
-if [[ "$GITHUB_VIA" = "merge api" ]] && [[ "$GITHUB_PULL_REQUEST_AUTHOR_LOGIN" = "$GITHUB_USER_LOGIN" ]]; then
+if [[ "$GITHUB_VIA" = *"merge"* ]] && [[ "$GITHUB_PULL_REQUEST_AUTHOR_LOGIN" = "$GITHUB_USER_LOGIN" ]]; then
12
echo "Blocking merging of your own pull request."
13
exit 1
14
fi
0 commit comments