diff --git a/dist/index.js b/dist/index.js index 3824965..563fe23 100644 --- a/dist/index.js +++ b/dist/index.js @@ -200,8 +200,10 @@ dotenv_1.default.config(); const prNumber = parseInt(core.getInput('PR_NUMBER') || process.env.PR_NUMBER); const org = core.getInput('GITHUB_ORG') || process.env.GITHUB_ORG; const repo = core.getInput('GITHUB_REPOSITORY') || process.env.GITHUB_REPOSITORY; +// We'll need to parse the repo variable to remove the owner and the / from the string +const repoName = repo.split('/')[1]; async function main() { - const PR = await (0, github_1.getSinglePR)(org, repo, prNumber); + const PR = await (0, github_1.getSinglePR)(org, repoName, prNumber); const assertion = await (0, github_1.getAssertion)(PR?.body ?? ''); if (assertion?.length === 0 || assertion === null) { console.log('No assertion found'); diff --git a/src/index.ts b/src/index.ts index 5871050..e9916d5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,7 @@ const repo: string = core.getInput('GITHUB_REPOSITORY') || (process.env.GITHUB_R const repoName = repo.split('/')[1]; async function main() { - const PR = await getSinglePR(org, repo, prNumber); + const PR = await getSinglePR(org, repoName, prNumber); const assertion = await getAssertion(PR?.body ?? ''); if (assertion?.length === 0 || assertion === null) { console.log('No assertion found');