From 2343de5e864b8da1db963496930c716aaa008bd4 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Mon, 5 Aug 2024 16:11:59 +0100 Subject: [PATCH] Fix the place to update the PR --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67393b2..040b8b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,8 +141,17 @@ jobs: \`\`\` *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; + if (context.issue.number) { + issue = context.issue.number; + } else { + issue = (await github.rest.repos.listPullRequestsAssociatedWithCommit({ + commit_sha: context.sha, + owner: context.repo.owner, + repo: context.repo.repo, + })).data[0].number; + } github.rest.issues.createComment({ - issue_number: context.issue.number, + issue_number: issue, owner: context.repo.owner, repo: context.repo.repo, body: output