From 7aae7fade349b37f201186ee5cdd9b3010f992bf Mon Sep 17 00:00:00 2001 From: Nathan Douglas Date: Wed, 15 Nov 2023 08:28:04 -0500 Subject: [PATCH] VACMS-16134: Accepts branch names starting with just an issue number. --- hooks/git/pre-commit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hooks/git/pre-commit b/hooks/git/pre-commit index f4b6a97cba..eae146b86e 100755 --- a/hooks/git/pre-commit +++ b/hooks/git/pre-commit @@ -3,7 +3,7 @@ # Check a specified branch name against a list of allowed patterns. function check_branch_name() { case $1 in - VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | "") return 0;; + VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | [1-9][0-9]* | "") return 0;; *) return 1;; esac } @@ -22,7 +22,8 @@ function branch_name_error() { cat <<-EOF >&2 Aborting commit. Your branch name must be prefixed with one of the following: - a VAGOV-TEAM-* or VACMS-* Github issue number format, - e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name. + e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name + - a new GitHub issue number format, e.g. 123-issue-name - dependabot/* (for work on Dependabot PRs) - revert-* (for work on GitHub-initiated revert PRs)