Skip to content

Commit d849674

Browse files
Merge pull request #92 from wphillipmoore/bugfix/pre-commit-release-branches
fix: allow commits on release/* branches in library-release model
2 parents 66c3a59 + 4eea80e commit d849674

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/git-hooks/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi
1212

1313
# Block commits to protected branches (universal set — safe for all models).
1414
case "$current_branch" in
15-
develop|release|main|release/*)
15+
develop|release|main)
1616
echo "ERROR: direct commits to protected branches are forbidden ($current_branch)." >&2
1717
echo "Create a short-lived branch and open a PR." >&2
1818
exit 1
@@ -44,8 +44,8 @@ case "$branching_model" in
4444
allowed_display="feature/*, bugfix/*, hotfix/*, or promotion/*"
4545
;;
4646
library-release)
47-
allowed_regex='^(feature|bugfix|hotfix)/'
48-
allowed_display="feature/*, bugfix/*, or hotfix/*"
47+
allowed_regex='^(feature|bugfix|hotfix|release)/'
48+
allowed_display="feature/*, bugfix/*, hotfix/*, or release/*"
4949
;;
5050
"")
5151
echo "WARNING: branching_model not found in $profile_file; falling back to feature/*/bugfix/*." >&2

0 commit comments

Comments
 (0)