Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Skip hook in CI environment (GitHub Actions)
# Pushing to main is forbidden by branch protection rules, only the release workflow can do this.
if [ -n "$CI" ]; then
exit 0
fi

branch_name="$(git symbolic-ref --short HEAD)"
if [ "$branch_name" = "main" ]; then
echo "Pushing directly to main is not allowed."
Expand Down