File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ const github = __nccwpck_require__(331);
1010
1111const run = async ( ) => {
1212 // Get octokit
13- const gitHubToken = core . getInput ( 'repo-token' , { required : true } ) ;
14- const client = github . getOctokit ( gitHubToken ) ;
13+ const token = core . getInput ( 'token' , { required : true } ) ;
14+ const is_oauth_token = core . getInput ( 'is-oauth-token' ) ;
15+
16+ const githubToken = is_oauth_token ? '' : token ;
17+ const oauthToken = is_oauth_token ? token : '' ;
18+ const client = github . getOctokit ( githubToken , { auth : oauthToken } ) ;
1519
1620 // Get issue and pr message
1721 const issueMessage = core . getInput ( 'issue-message' ) ;
@@ -60,7 +64,7 @@ const run = async () => {
6064
6165
6266 // Do nothing if its not their first contribution
63- console . log ( 'Checking if its the users first contribution' ) ;
67+ console . log ( 'Checking if it is the user\'s first contribution' ) ;
6468
6569 let firstContribution = false ;
6670 if ( isIssue ) {
You can’t perform that action at this time.
0 commit comments