Skip to content

Commit 08bc1c9

Browse files
committed
fixed commit checker: lowecase support
1 parent fe76840 commit 08bc1c9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

commit-msg-matcher/dist/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31099,7 +31099,7 @@ const github = __nccwpck_require__(7364);
3109931099

3110031100
const asyncFunction = (t) => new Promise(resolve => setTimeout(resolve, t));
3110131101

31102-
const commitMsgTemplate = /^#\d+|^[cdweb]+-\d+|^\w+\/\w+-?\w+#\d{1,6}|^Merge/gi;
31102+
const commitMsgTemplate = /^#\d+|^[cdwebCDWEB]+-\d+|^\w+\/\w+-?\w+#\d{1,6}|^Merge/gi;
3110331103

3110431104
const jiraUssueApi = "https://dbeaver.atlassian.net/rest/api/2/issue/";
3110531105
const githubUssueApi = "https://api.github.com/repos/";
@@ -31160,15 +31160,15 @@ function msgBelongsTo(msg) {
3116031160
return new Ticket(board, ticketID);
3116131161

3116231162
} else if (msg.substring(0, 2).toLowerCase() == "cb") {
31163-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
31163+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
3116431164
return new Ticket('jira', ticketMeta[0]);
3116531165

3116631166
} else if (msg.substring(0, 2).toLowerCase() == "db") {
31167-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
31167+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
3116831168
return new Ticket('jira', ticketMeta[0]);
3116931169

3117031170
} else if (msg.substring(0, 3).toLowerCase() == "web") {
31171-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
31171+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
3117231172
return new Ticket('jira', ticketMeta[0]);
3117331173

3117431174
} else if (/^\w+\/\w+-?\w+#\d{1,6}/.test(msg)) {

commit-msg-matcher/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const github = require('@actions/github');
66

77
const asyncFunction = (t) => new Promise(resolve => setTimeout(resolve, t));
88

9-
const commitMsgTemplate = /^#\d+|^[cdweb]+-\d+|^\w+\/\w+-?\w+#\d{1,6}|^Merge/gi;
9+
const commitMsgTemplate = /^#\d+|^[cdwebCDWEB]+-\d+|^\w+\/\w+-?\w+#\d{1,6}|^Merge/gi;
1010

1111
const jiraUssueApi = "https://dbeaver.atlassian.net/rest/api/2/issue/";
1212
const githubUssueApi = "https://api.github.com/repos/";
@@ -67,15 +67,15 @@ function msgBelongsTo(msg) {
6767
return new Ticket(board, ticketID);
6868

6969
} else if (msg.substring(0, 2).toLowerCase() == "cb") {
70-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
70+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
7171
return new Ticket('jira', ticketMeta[0]);
7272

7373
} else if (msg.substring(0, 2).toLowerCase() == "db") {
74-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
74+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
7575
return new Ticket('jira', ticketMeta[0]);
7676

7777
} else if (msg.substring(0, 3).toLowerCase() == "web") {
78-
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
78+
let ticketMeta = msg.match(/^[a-zA-Z]+-\d{1,6}/);
7979
return new Ticket('jira', ticketMeta[0]);
8080

8181
} else if (/^\w+\/\w+-?\w+#\d{1,6}/.test(msg)) {

0 commit comments

Comments
 (0)