From cbc8da6163d4903deb16ca2e7e9d7a0e9360e62e Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 20 Nov 2024 20:39:05 -0800 Subject: [PATCH] *: try token fix --- action.cjs | 3 ++- src/getPatch.js | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/action.cjs b/action.cjs index 4d88768..66d6e84 100644 --- a/action.cjs +++ b/action.cjs @@ -75,7 +75,8 @@ module.exports = async ({ github, context, inputs, actionPath }) => { prnum: options.prnum, debug, runIfPrivate: options.run_if_private, - github + github, + githubToken: options.github_token // fallback to token use when downloading private repos }) const filteredPatch = await filterdiff({ diff --git a/src/getPatch.js b/src/getPatch.js index 8e607f7..ee04ebb 100644 --- a/src/getPatch.js +++ b/src/getPatch.js @@ -16,10 +16,6 @@ export default async function getPatch ({ github = new Octokit({ auth: githubToken }) } - if (!githubToken) { - githubToken = process.env.GITHUB_TOKEN - } - if (debug) { console.log(`getPatch ${owner} ${repo} ${prnum}`) } let patchBody = null