@@ -100,7 +100,7 @@ class Git {
100100 // In case there are multiple tags get the first valid version tag
101101 if ( this . settings . tagRegex ) {
102102 res . stdout . forEach ( tag => {
103- if ( RegExp ( this . settings . tagRegex ) . test ( tag ) ) {
103+ if ( this . settings . tagRegex . test ( tag ) ) {
104104 return tag ;
105105 }
106106 } ) ;
@@ -120,7 +120,7 @@ class Git {
120120 }
121121 if ( this . settings . tagRegex ) {
122122 const foundTag = res . stdout [ 0 ] ;
123- if ( ! RegExp ( this . settings . tagRegex ) . test ( foundTag ) ) {
123+ if ( ! this . settings . tagRegex . test ( foundTag ) ) {
124124 // If previous tag doesn't match the regex keep searching back
125125 return this . previousTag ( foundTag ) ;
126126 }
@@ -148,7 +148,7 @@ class Git {
148148 const split = commit . split ( ' ' ) ;
149149 const hash = split [ 0 ] ;
150150 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 ) ) {
152152 return ;
153153 }
154154 commits . push ( new GitCommit ( hash , message ) ) ;
@@ -299,8 +299,9 @@ function initSettings() {
299299 return __awaiter ( this , void 0 , void 0 , function * ( ) {
300300 const settings = { } ;
301301 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 ) ;
304305 settings . changelogFilePath = core . getInput ( 'changelog-file-path' ) || 'CHANGELOG.md' ;
305306 return settings ;
306307 } ) ;
0 commit comments