From 4a03adf263594d37ccf0a0eed6589e2eda206786 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Fri, 8 Sep 2023 13:49:28 -0700 Subject: [PATCH] ci: Fix PR resolution in comment (#4592) --- .github/workflows/approval-comment.yaml | 1 + .github/workflows/snapshot-release.yaml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/approval-comment.yaml b/.github/workflows/approval-comment.yaml index 6d034562504d..4fe177795a75 100644 --- a/.github/workflows/approval-comment.yaml +++ b/.github/workflows/approval-comment.yaml @@ -16,6 +16,7 @@ jobs: run: | mkdir -p /tmp/artifacts echo ${{ github.event.review.body }} >> /tmp/artifacts/metadata.txt + echo ${{ github.event.pull_request.number }} >> /tmp/artifacts/metadata.txt echo ${{ github.event.review.commit_id }} >> /tmp/artifacts/metadata.txt cat /tmp/artifacts/metadata.txt - uses: ./.github/actions/upload-artifact diff --git a/.github/workflows/snapshot-release.yaml b/.github/workflows/snapshot-release.yaml index a4981f68ebb8..0b83b4e2fe62 100644 --- a/.github/workflows/snapshot-release.yaml +++ b/.github/workflows/snapshot-release.yaml @@ -17,8 +17,7 @@ jobs: - uses: ./.github/actions/download-artifact - name: Parse artifacts and assign GA environment variables run: | - repo=$(head -n 1 /tmp/artifacts/metadata.txt) - pr_number=$(head -n 1 /tmp/artifacts/metadata.txt) + pr_number=$(head -n 2 /tmp/artifacts/metadata.txt | tail -n 1) pr_commit=$(tail -n 1 /tmp/artifacts/metadata.txt) echo "PR_COMMIT=$pr_commit" >> $GITHUB_ENV echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV