File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ inputs:
1515 token :
1616 required : false
1717 description : Access token to the repository. If not set, the action will use the default GitHub Actions token at runtime.
18+ default : ${{ github.token }}
1819 subject_pattern :
1920 required : false
2021 description : A regex pattern to validate the subject of the commit message.
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ let once = false;
88
99function getClient ( ) : InstanceType < typeof GitHub > {
1010 if ( once ) return octokit ;
11- let token = getInput ( "token" ) ;
11+ const token = getInput ( "token" ) || process . env [ "GITHUB_TOKEN" ] || "" ;
1212 if ( ! token ) {
13- token = process . env [ "GITHUB_TOKEN" ] || "" ;
13+ throw new Error ( "GitHub token is required but not provided." ) ;
1414 }
1515 setSecret ( token ) ;
1616
You can’t perform that action at this time.
0 commit comments