Skip to content

Commit

Permalink
added Project prefix to feature branch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppodelldog committed Jun 26, 2018
1 parent 609d16b commit 0cd72fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion featurebranch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gitcommithook
import "regexp"

var patterns = []string{
`(?m)(?:\s|^|/)([A-Z]+-[0-9]+)([\s,;:!.-]|$)`,
`(?m)(?:\s|^|/)(([A-Z](_)*)+-[0-9]+)([\s,;:!.-]|$)`,
}

//IsFeatureBranch detects weatcher the input matches one of the defined patterns
Expand Down
1 change: 1 addition & 0 deletions featurebranch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func TestIsFeatureBranch_Positive(t *testing.T) {
}{
{"TOOL-1242", true},
{"feature/TOOL-1242", true},
{"feature/PROJECT_XYZ-2938", true},
}

for _, test := range testData {
Expand Down

0 comments on commit 0cd72fa

Please sign in to comment.