From bbbc26138c3dd4c1eeb9d744248be619f4249e0d Mon Sep 17 00:00:00 2001 From: Rob Dominguez Date: Mon, 8 Jan 2024 09:22:19 -0600 Subject: [PATCH] =?UTF-8?q?helps=20to=20create=20a=20build=20=F0=9F=A4=A6?= =?UTF-8?q?=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 4 +++- src/index.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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');