Skip to content

Commit

Permalink
chore: try creating client att point of use
Browse files Browse the repository at this point in the history
  • Loading branch information
nilslice committed Jan 19, 2024
1 parent 4ecb96e commit d7e3ec3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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({
Expand Down

0 comments on commit d7e3ec3

Please sign in to comment.