@@ -18,20 +18,20 @@ if (core.getInput("commit-author")) {
1818 assert . equal ( core . getInput ( "commit-author-name" ) , "" ) ;
1919 assert . equal ( core . getInput ( "commit-author-email" ) , "" ) ;
2020 if (
21- / ^ \s + @ ? g i t h u b [ - _ ] ? a c t i o n s (?: \[ b o t \] ) ? \s + $ / . test (
21+ / ^ \s * @ ? g i t h u b [ - _ ] ? a c t i o n s (?: \[ b o t \] ) ? \s * $ / . test (
2222 core . getInput ( "commit-author" )
2323 )
2424 ) {
2525 GIT_AUTHOR_NAME = "github-actions[bot]" ;
2626 GIT_AUTHOR_EMAIL =
2727 "41898282+github-actions[bot]@users.noreply.github.com" ;
28- } else if ( / ^ \s + @ ? m e \s + $ / . test ( core . getInput ( "commit-author" ) ) ) {
28+ } else if ( / ^ \s * @ ? m e \s * $ / . test ( core . getInput ( "commit-author" ) ) ) {
2929 GIT_AUTHOR_NAME = process . env . GITHUB_ACTOR ;
3030 GIT_AUTHOR_EMAIL = `${ process . env . GITHUB_ACTOR_ID } +${ process . env . GITHUB_ACTOR } @users.noreply.github.com` ;
3131 } else {
3232 [ GIT_AUTHOR_NAME , GIT_AUTHOR_EMAIL ] = core
3333 . getInput ( "commit-author" )
34- . match ( / ^ \s + ( .+ ) \s + < ( .+ ) > \s + $ / )
34+ . match ( / ^ \s * ( .+ ) \s + < ( .+ ) > \s * $ / )
3535 . slice ( 1 ) ;
3636 }
3737} else {
@@ -45,20 +45,20 @@ if (core.getInput("commit-committer")) {
4545 assert . equal ( core . getInput ( "commit-committer-name" ) , "" ) ;
4646 assert . equal ( core . getInput ( "commit-committer-email" ) , "" ) ;
4747 if (
48- / ^ \s + @ ? g i t h u b [ - _ ] ? a c t i o n s (?: \[ b o t \] ) ? \s + $ / . test (
48+ / ^ \s * @ ? g i t h u b [ - _ ] ? a c t i o n s (?: \[ b o t \] ) ? \s * $ / . test (
4949 core . getInput ( "commit-committer" )
5050 )
5151 ) {
5252 GIT_COMMITTER_NAME = "github-actions[bot]" ;
5353 GIT_COMMITTER_EMAIL =
5454 "41898282+github-actions[bot]@users.noreply.github.com" ;
55- } else if ( / ^ \s + @ ? m e \s + $ / . test ( core . getInput ( "commit-committer" ) ) ) {
55+ } else if ( / ^ \s * @ ? m e \s * $ / . test ( core . getInput ( "commit-committer" ) ) ) {
5656 GIT_COMMITTER_NAME = process . env . GITHUB_ACTOR ;
5757 GIT_COMMITTER_EMAIL = `${ process . env . GITHUB_ACTOR_ID } +${ process . env . GITHUB_ACTOR } @users.noreply.github.com` ;
5858 } else {
5959 [ GIT_COMMITTER_NAME , GIT_COMMITTER_EMAIL ] = core
6060 . getInput ( "commit-committer" )
61- . match ( / ^ \s + ( .+ ) \s + < ( .+ ) > \s + $ / )
61+ . match ( / ^ \s * ( .+ ) \s + < ( .+ ) > \s * $ / )
6262 . slice ( 1 ) ;
6363 }
6464} else {
0 commit comments