Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-16134: Accepts branch names starting with just an issue number. #16135

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
5 changes: 3 additions & 2 deletions hooks/git/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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)

Expand Down
Loading