Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed Dec 21, 2023
1 parent 176cfbe commit ca8d263
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runs:
const { default: explainPatch } = await import('${{ github.action_path }}/src/openaiExplainPatch.js');
const { default: filterdiff } = await import('${{ github.action_path }}/src/filterdiff.js');
const { default: getPatch } = await import('${{ github.action_path }}/src/getPatch.js');
const { default: getConfig } = await import('${{ github.action_path }}/src/getPatch.js');
const { default: getConfig } = await import('${{ github.action_path }}/src/getConfig.js');
const { default: getProperties } = await import('${{ github.action_path }}/src/getProperties.js');
const inputs = ${{ toJson(inputs) }};
Expand Down
2 changes: 1 addition & 1 deletion src/getConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
async function getConfig({ owner, repo, path, github, githubToken, debug = false }) {
export async function getConfig({ owner, repo, path, github, githubToken, debug = false }) {
if (!github && githubToken) {
const { Octokit } = await import("@octokit/core");

Expand Down
8 changes: 6 additions & 2 deletions src/getPatch.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
export default async function getPRPatch({ owner, repo, prnum,
export default async function getPatch({ owner, repo, prnum,
githubToken = null,
github = null,
runIfPrivate = false
runIfPrivate = false,
debug = false
}) {
if (!github && githubToken) {
const { Octokit } = await import("@octokit/core");

github = new Octokit({ auth: githubToken })
}

if (debug)
console.log(`getPatch ${owner} ${repo} ${prnum}`);

var patchBody = null;

Expand Down

0 comments on commit ca8d263

Please sign in to comment.