diff options
| author | saurabh <saurabhrai1717@gmail.com> | 2025-12-06 20:20:06 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-06 09:50:06 -0500 |
| commit | fd4c5fa3edb1fa3f968085a7cb8b3e19f5646105 (patch) | |
| tree | 3ce8953025f841f3fd473f41aadcdfc26a5c3ecf /.github/workflows/coverage_comment.yml | |
| parent | 020e5799ad74cfafd469f032cd05767c9d670a16 (diff) | |
Refs #36620 -- Fixed PR number extraction in coverage_comment workflow.
Passing the PR number as an artifact is more reliable in cross-fork workflows.
Diffstat (limited to '.github/workflows/coverage_comment.yml')
| -rw-r--r-- | .github/workflows/coverage_comment.yml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/.github/workflows/coverage_comment.yml b/.github/workflows/coverage_comment.yml index 42a5b0251f..fc58575836 100644 --- a/.github/workflows/coverage_comment.yml +++ b/.github/workflows/coverage_comment.yml @@ -8,6 +8,7 @@ on: permissions: contents: read + actions: read pull-requests: write jobs: @@ -20,16 +21,22 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - name: Download diff coverage report + - name: Download coverage artifacts uses: actions/download-artifact@v4 with: - name: diff-coverage-report-${{ github.event.workflow_run.pull_requests[0].number }} + name: coverage-artifacts github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ github.event.workflow_run.id }} + - name: Read PR number + id: pr + run: | + pr_number=$(cat pr_number.txt) + echo "number=$pr_number" >> $GITHUB_OUTPUT + - name: Post/update PR comment env: - PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} + PR_NUMBER: ${{ steps.pr.outputs.number }} uses: actions/github-script@v8 with: script: | |
