Skip to content

Commit 25246f8

Browse files
authored
Finding the PR ID
1 parent 4dd61bd commit 25246f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,19 @@ jobs:
149149
path: ${{ github.workspace }}/code-coverage-results.md
150150
retention-days: 7
151151

152+
- name: Find GitHub PR ID
153+
if: ${{ github.event_name == 'pull_request' }}
154+
id: pr_finder
155+
uses: jwalton/gh-find-current-pr@mv1
156+
with:
157+
github-token: ${{ secrets.GITHUB_TOKEN }}
158+
152159
- name: Add coverage PR comment
153160
if: ${{ github.event_name == 'pull_request' }}
154161
uses: peter-evans/create-or-update-comment@v4
155162
with:
156163
token: ${{ secrets.GITHUB_TOKEN }}
157-
issue-number: ${{ github.event.number }},
164+
issue-number: ${{ steps.pr_finder.outputs.number }},
158165
body-path: ${{ github.workspace }}/code-coverage-results.md
159166

160167
sign:

0 commit comments

Comments
 (0)