Skip to content

Commit 97689a2

Browse files
authored
VACMS-16134: Accepts branch names starting with just an issue number. (#16135)
1 parent 5effa82 commit 97689a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hooks/git/pre-commit

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Check a specified branch name against a list of allowed patterns.
44
function check_branch_name() {
55
case $1 in
6-
VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | "") return 0;;
6+
VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | [1-9][0-9]* | "") return 0;;
77
*) return 1;;
88
esac
99
}
@@ -22,7 +22,8 @@ function branch_name_error() {
2222
cat <<-EOF >&2
2323
Aborting commit. Your branch name must be prefixed with one of the following:
2424
- a VAGOV-TEAM-* or VACMS-* Github issue number format,
25-
e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name.
25+
e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name
26+
- a new GitHub issue number format, e.g. 123-issue-name
2627
- dependabot/* (for work on Dependabot PRs)
2728
- revert-* (for work on GitHub-initiated revert PRs)
2829

0 commit comments

Comments
 (0)