Skip to content

Commit

Permalink
Merge pull request github#132 from osowskit/master
Browse files Browse the repository at this point in the history
Minor fixes to block self merge hook
  • Loading branch information
Tom Osowski authored Mar 25, 2017
2 parents 0424962 + 3795262 commit 93a65f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pre-receive-hooks/block_self_merge_prs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# https://help.github.com/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-appliance/
#

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
echo "Blocking merging of your own pull request."
exit 1
fi
Expand Down

0 comments on commit 93a65f7

Please sign in to comment.