mirror of
https://github.com/hexastack/hexabot
synced 2024-11-24 13:05:15 +00:00
9 lines
211 B
Plaintext
9 lines
211 B
Plaintext
|
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
||
|
|
||
|
RESTRICTED_BRANCHES="^(main)$"
|
||
|
|
||
|
if echo "$BRANCH_NAME" | grep -Eq "$RESTRICTED_BRANCHES"; then
|
||
|
echo "Cannot push directly to branch: '${BRANCH_NAME}'"
|
||
|
exit 1
|
||
|
fi
|