@@ -100,7 +100,7 @@ class Git {
100
100
// In case there are multiple tags get the first valid version tag
101
101
if ( this . settings . tagRegex ) {
102
102
res . stdout . forEach ( tag => {
103
- if ( RegExp ( this . settings . tagRegex ) . test ( tag ) ) {
103
+ if ( this . settings . tagRegex . test ( tag ) ) {
104
104
return tag ;
105
105
}
106
106
} ) ;
@@ -120,7 +120,7 @@ class Git {
120
120
}
121
121
if ( this . settings . tagRegex ) {
122
122
const foundTag = res . stdout [ 0 ] ;
123
- if ( ! RegExp ( this . settings . tagRegex ) . test ( foundTag ) ) {
123
+ if ( ! this . settings . tagRegex . test ( foundTag ) ) {
124
124
// If previous tag doesn't match the regex keep searching back
125
125
return this . previousTag ( foundTag ) ;
126
126
}
@@ -148,7 +148,7 @@ class Git {
148
148
const split = commit . split ( ' ' ) ;
149
149
const hash = split [ 0 ] ;
150
150
const message = split . slice ( 1 ) . join ( ' ' ) . trim ( ) ;
151
- if ( this . settings . filterRegex && RegExp ( this . settings . filterRegex ) . test ( message ) ) {
151
+ if ( this . settings . filterRegex && this . settings . filterRegex . test ( message ) ) {
152
152
return ;
153
153
}
154
154
commits . push ( new GitCommit ( hash , message ) ) ;
@@ -299,8 +299,9 @@ function initSettings() {
299
299
return __awaiter ( this , void 0 , void 0 , function * ( ) {
300
300
const settings = { } ;
301
301
settings . gitPath = yield io . which ( 'git' , true ) ;
302
- settings . tagRegex = core . getInput ( 'tag-regex' ) || '' ;
303
- settings . filterRegex = core . getInput ( 'filter-regex' ) || '' ;
302
+ const caseInsensitive = core . getInput ( 'case-insensitive-regex' ) ;
303
+ settings . tagRegex = RegExp ( core . getInput ( 'tag-regex' ) , caseInsensitive ) ;
304
+ settings . filterRegex = RegExp ( core . getInput ( 'filter-regex' ) , caseInsensitive ) ;
304
305
settings . changelogFilePath = core . getInput ( 'changelog-file-path' ) || 'CHANGELOG.md' ;
305
306
return settings ;
306
307
} ) ;
0 commit comments