Skip to content

Commit 6b5e8f4

Browse files
authored
Merge pull request #6 from dkleuser/master
Make the JIRA issue ID recognition case insensitive
2 parents 4ecbd49 + 81f538d commit 6b5e8f4

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ _testmain.go
2727
jitic
2828
release/
2929
jitic-v*
30+
31+
# IDE
32+
.idea/

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func GetIssuesOutOfMessage(issueMessage string) []string {
131131
// ((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)
132132
// See http://stackoverflow.com/questions/26771592/negative-look-ahead-go-regular-expressions
133133
var issues []string
134-
re := regexp.MustCompile("([A-Z]+)-(\\d+)")
134+
re := regexp.MustCompile("(?i)([A-Z]+)-(\\d+)")
135135

136136
parts := re.FindAllStringSubmatch(issueMessage, -1)
137137
for _, v := range parts {

main_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func TestGetIssuesOutOfMessage(t *testing.T) {
1414
{"[WEB-22861] remove authentication prod build for now", []string{"WEB-22861"}},
1515
{"WEB-4711 SYS-1234 PRD-5678 remove authentication prod build for now", []string{"WEB-4711", "SYS-1234", "PRD-5678"}},
1616
{"[SCC-27] Replace deprecated autoloader strategy PSR-0 with PSR-4", []string{"SCC-27", "PSR-4"}},
17+
{"WeB-4711 sys-1234 PRD-5678 remove authentication prod build for now", []string{"WeB-4711", "sys-1234", "PRD-5678"}},
1718
{"TASKLESS: Removes duplicated comment code.", nil},
1819
}
1920

0 commit comments

Comments
 (0)