Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 7503d81

Browse files
Merge pull request #19 from zhiliangxu/patch-2
Use up-to-date API of @actions/github
2 parents 4beb1b0 + da7f9d2 commit 7503d81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

responses/14_create-js-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function run() {
8989
const jokeBody = core.getInput("joke");
9090
const token = core.getInput("repo-token");
9191

92-
const octokit = new github.GitHub(token);
92+
const octokit = github.getOctokit(token);
9393
} catch (err) {}
9494
}
9595

@@ -106,7 +106,7 @@ async function run() {
106106
const jokeBody = core.getInput("joke");
107107
const token = core.getInput("repo-token");
108108

109-
const octokit = new github.GitHub(token);
109+
const octokit = github.getOctokit(token);
110110

111111
const newIssue = await octokit.issues.create({
112112
repo: github.context.repo.repo,
@@ -132,7 +132,7 @@ async function run() {
132132
const jokeBody = core.getInput("joke");
133133
const token = core.getInput("repo-token");
134134

135-
const octokit = new github.GitHub(token);
135+
const octokit = github.getOctokit(token);
136136

137137
const newIssue = await octokit.issues.create({
138138
repo: github.context.repo.repo,

0 commit comments

Comments
 (0)