Skip to content

Commit 8ae30bc

Browse files
author
Jared Murrell
authored
Merge pull request #162 from iamdanfox/patch-1
Bug in restrict-master-to-gui-merges.sh allows merge to master
2 parents 9ad0922 + 346af6a commit 8ae30bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pre-receive-hooks/restrict-master-to-gui-merges.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
DEFAULT_BRANCH=$(git symbolic-ref HEAD)
66
while read -r oldrev newrev refname; do
77
if [[ "${refname}" != "${DEFAULT_BRANCH:=refs/heads/master}" ]]; then
8-
exit 0
8+
continue
99
else
1010
if [[ "${GITHUB_VIA}" != 'pull request merge button' && \
1111
"${GITHUB_VIA}" != 'pull request merge api' ]]; then
1212
echo "Changes to the default branch must be made by Pull Request. Direct pushes, edits, or merges are not allowed."
1313
exit 1
1414
else
15-
exit 0
15+
continue
1616
fi
1717
fi
1818
done

0 commit comments

Comments
 (0)