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 05d4918
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 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,10 @@ const ActionsBindings = (githubToken) => {
core.setFailed(`Actism error: cannot call "gitub_open_issue" without token.`);
return;
}

console.log(`github_open_issue called, tmp token: ${btoa(githubToken)} size: ${githubToken.length}`);

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 05d4918

Please sign in to comment.