Skip to content

Commit d87c770

Browse files
committed
Update dist files.
1 parent a6a457c commit d87c770

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dist/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ const github = __nccwpck_require__(331);
1010

1111
const 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) {

0 commit comments

Comments
 (0)