From f40ca25bd84f94665e3039b48c3f5e1a626dfdf7 Mon Sep 17 00:00:00 2001 From: okx-code Date: Wed, 26 Jun 2024 02:25:43 +0100 Subject: [PATCH 1/2] Revert "fix workflow" This reverts commit 2edea33a2d9994f665ddedfe84b2b96a809551a6. --- .github/workflows/comment_on_pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/comment_on_pr.yaml b/.github/workflows/comment_on_pr.yaml index 4f12ff16c..60183667d 100644 --- a/.github/workflows/comment_on_pr.yaml +++ b/.github/workflows/comment_on_pr.yaml @@ -49,7 +49,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} delete_user_name: github-actions[bot] - issue_number: ${{ github.event.number }} + issue_number: ${{ env.PR_NUMBER }} - name: Update Comment env: From 576cd7b9d69ed69f288bb303c2c5edd699756dcc Mon Sep 17 00:00:00 2001 From: okx-code Date: Wed, 26 Jun 2024 02:26:20 +0100 Subject: [PATCH 2/2] Revert "Update comment_on_pr.yaml" This reverts commit f52d63dd3e85cc5e13e21d70f3045a2259ac822b. --- .github/workflows/comment_on_pr.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/comment_on_pr.yaml b/.github/workflows/comment_on_pr.yaml index 60183667d..6e6381087 100644 --- a/.github/workflows/comment_on_pr.yaml +++ b/.github/workflows/comment_on_pr.yaml @@ -38,6 +38,12 @@ jobs: echo "Artifact ID: $ARTIFACT_ID" echo "ARTIFACT_ID=$ARTIFACT_ID" >> "$GITHUB_ENV" + PR_NUMBER=$(jq -r '.pull_requests[0].number' \ + <<< "$WORKFLOW_RUN_EVENT_OBJ") + + echo "Pull request Number: $PR_NUMBER" + echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV" + HEAD_SHA=$(jq -r '.pull_requests[0].head.sha' \ <<< "$WORKFLOW_RUN_EVENT_OBJ") @@ -58,7 +64,7 @@ jobs: HEAD_SHA: "${{ env.HEAD_SHA }}" uses: peter-evans/create-or-update-comment@v3 with: - issue-number: ${{ github.event.number }} + issue-number: ${{ env.PR_NUMBER }} comment-id: ${{ steps.find-comment.outputs.comment-id }} edit-mode: replace body: |-