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.
1 parent eb5ba44 commit 3795262Copy full SHA for 3795262
pre-receive-hooks/block_self_merge_prs.sh
@@ -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 [[ ! -z "$GITHUB_VIA" ]] && [[ "$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