File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @planable/commitlint-config" ,
3
- "version" : " 1.2.6 " ,
3
+ "version" : " 1.2.7 " ,
4
4
"description" : " Commitlint configs used in Planable projects" ,
5
5
"main" : " dist/index.js" ,
6
6
"files" : [
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ declare module "@commitlint/types" {
16
16
const anyEmojiWithSpaceAfter =
17
17
/ ^ ( [ \u{1f300} - \u{1f5ff} \u{1f900} - \u{1f9ff} \u{1f600} - \u{1f64f} \u{1f680} - \u{1f6ff} \u{2600} - \u{26ff} \u{2700} - \u{27bf} \u{1f1e6} - \u{1f1ff} \u{1f191} - \u{1f251} \u{1f004} \u{1f0cf} \u{1f170} - \u{1f171} \u{1f17e} - \u{1f17f} \u{1f18e} \u{3030} \u{2b50} \u{2b55} \u{2934} - \u{2935} \u{2b05} - \u{2b07} \u{2b1b} - \u{2b1c} \u{3297} \u{3299} \u{303d} \u{00a9} \u{00ae} \u{2122} \u{23f3} \u{24c2} \u{23e9} - \u{23ef} \u{25b6} \u{23f8} - \u{23fa} ] (?: [ \u{fe00} - \u{fe0f} ] ) ? ) \s / u;
18
18
const optionalPlanableTicketWithSpaceAfter = / (?: \[ ( .+ ) \] \s ) ? / ;
19
- const subjectThatDoesNotStartsWithBracket = / ( [ ^ [ \d \s ] [ a - z A - Z ] (?: (? ! \[ P - \d ) .) * ) $ / ;
19
+ const subjectThatDoesNotStartsWithBracket =
20
+ / ( [ ^ [ \d \s ] [ a - z A - Z ] (?: (? ! \[ P - \d | S E R - \d ) .) * ) $ / ;
20
21
21
22
const headerMatchPlanablePattern : Rule = ( parsed : Commit ) => {
22
23
const { type, ticket, subject } = parsed ;
@@ -30,14 +31,14 @@ const headerMatchPlanablePattern: Rule = (parsed: Commit) => {
30
31
} ;
31
32
32
33
const ticketPattern : Rule = ( parsed : Commit ) => {
33
- const planableTicket = / ( ^ P - \d + $ ) / ;
34
+ const planableTicket = / ( ^ P - \d + $ ) | ( ^ S E R - \d + $ ) / ;
34
35
35
36
const { ticket } = parsed ;
36
37
if ( ticket ) {
37
38
if ( ! planableTicket . test ( ticket ) ) {
38
39
return [
39
40
false ,
40
- "ticket must be in format of a valid Linear issue, for example: [P-11]" ,
41
+ "ticket must be in format of a valid Linear issue, for example: [P-11] or [SER-123] " ,
41
42
] ;
42
43
}
43
44
}
You can’t perform that action at this time.
0 commit comments