Skip to content

Commit 3795262

Browse files
author
Thomas Osowski
committed
Switch to wildcard search
1 parent eb5ba44 commit 3795262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-receive-hooks/block_self_merge_prs.sh

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 [[ ! -z "$GITHUB_VIA" ]] && [[ "$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)