diff --git a/dist/index.js b/dist/index.js index 89e9671..7ac4d2b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1999,8 +1999,6 @@ const getPulls = async (repoToken, repo, commitSha) => { [Headers.Authorization]: `token ${repoToken}`, }; - core.debug(`https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`); - const response = await http.getJson( `https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`, additionalHeaders @@ -2023,13 +2021,10 @@ async function run() { core.debug(`input allow-repeats: ${allowRepeats}`); const { - payload: { pull_request: pullRequest, sha, repository }, + payload: { pull_request: pullRequest, repository }, + sha: commitSha, } = github.context; - core.debug(JSON.stringify(github.context)); - core.debug(JSON.stringify(pullRequest)); - core.debug(`sha: ${sha}`); - const { full_name: repoFullName } = repository; let issueNumber; @@ -2038,7 +2033,7 @@ async function run() { issueNumber = pullRequest.number; } else { // If this is not a pull request, attempt to find a PR matching the sha - const pulls = await getPulls(repoToken, repoFullName, sha); + const pulls = await getPulls(repoToken, repoFullName, commitSha); issueNumber = pulls.length ? pulls[0].number : null; }