Skip to content

Commit fe76840

Browse files
committed
fixed commit checker: web support
1 parent 344a94f commit fe76840

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

commit-msg-matcher/dist/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31114,6 +31114,7 @@ const errorMsg = `
3111431114
* org/repo#<issue_number>
3111531115
* DB-Number (Jira)
3111631116
* CB-Number (Jira)
31117+
* WEB-Number (Jira)
3111731118

3111831119
For how to rename your commit message, follow this GitHub Doc:
3111931120
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message
@@ -31162,6 +31163,14 @@ function msgBelongsTo(msg) {
3116231163
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
3116331164
return new Ticket('jira', ticketMeta[0]);
3116431165

31166+
} else if (msg.substring(0, 2).toLowerCase() == "db") {
31167+
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
31168+
return new Ticket('jira', ticketMeta[0]);
31169+
31170+
} else if (msg.substring(0, 3).toLowerCase() == "web") {
31171+
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
31172+
return new Ticket('jira', ticketMeta[0]);
31173+
3116531174
} else if (/^\w+\/\w+-?\w+#\d{1,6}/.test(msg)) {
3116631175
let ticketMeta = msg.match(/^(\w+\/\w+-?\w+)#(\d{1,6})/);
3116731176
// ticketMeta[1] = board
@@ -31236,6 +31245,7 @@ async function main() {
3123631245
console.error(errorMsg);
3123731246
core.setFailed('Commit message validation failed.');
3123831247
}
31248+
3123931249
if (ticket) {
3124031250
await ticket.setStatus();
3124131251
console.log('Ticket status: ' + ticket.status)

commit-msg-matcher/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const errorMsg = `
2121
* org/repo#<issue_number>
2222
* DB-Number (Jira)
2323
* CB-Number (Jira)
24+
* WEB-Number (Jira)
2425
2526
For how to rename your commit message, follow this GitHub Doc:
2627
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message
@@ -69,6 +70,14 @@ function msgBelongsTo(msg) {
6970
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
7071
return new Ticket('jira', ticketMeta[0]);
7172

73+
} else if (msg.substring(0, 2).toLowerCase() == "db") {
74+
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
75+
return new Ticket('jira', ticketMeta[0]);
76+
77+
} else if (msg.substring(0, 3).toLowerCase() == "web") {
78+
let ticketMeta = msg.match(/^[A-Z]+-\d{1,6}/);
79+
return new Ticket('jira', ticketMeta[0]);
80+
7281
} else if (/^\w+\/\w+-?\w+#\d{1,6}/.test(msg)) {
7382
let ticketMeta = msg.match(/^(\w+\/\w+-?\w+)#(\d{1,6})/);
7483
// ticketMeta[1] = board
@@ -143,6 +152,7 @@ async function main() {
143152
console.error(errorMsg);
144153
core.setFailed('Commit message validation failed.');
145154
}
155+
146156
if (ticket) {
147157
await ticket.setStatus();
148158
console.log('Ticket status: ' + ticket.status)

0 commit comments

Comments
 (0)