diff --git a/index.js b/index.js index 5d74692..f18fa51 100644 --- a/index.js +++ b/index.js @@ -80,7 +80,6 @@ const Steps = (input) => { const ActionsBindings = (githubToken) => { const hostFuncs = {}; - const octokit = new github.GitHub(githubToken); hostFuncs.github_context = (plugin) => { return plugin.store(JSON.stringify(github.context)); @@ -91,6 +90,8 @@ const ActionsBindings = (githubToken) => { core.setFailed(`Actism error: cannot call "gitub_open_issue" without token.`); return; } + + const octokit = github.getOctokit({ auth: githubToken }); const title = plugin.read(titleOffs).text(); const body = plugin.read(bodyOffs).text(); octokit.rest.issues.create({