Skip to content

Commit 1b37e17

Browse files
mrecachinasCopilot
andcommitted
Skip benchmark PR comment for fork PRs
Fork PRs have read-only GITHUB_TOKEN and can't post comments. Skip the find/create comment steps when PR is from a fork. Benchmark comparison still runs and prints to console. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b55c039 commit 1b37e17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ jobs:
285285
286286
- name: Find existing comment
287287
uses: peter-evans/find-comment@v3
288+
if: github.event.pull_request.head.repo.full_name == github.repository
288289
id: find-comment
289290
with:
290291
issue-number: ${{ github.event.pull_request.number }}
@@ -293,6 +294,7 @@ jobs:
293294

294295
- name: Create or update comment
295296
uses: peter-evans/create-or-update-comment@v4
297+
if: github.event.pull_request.head.repo.full_name == github.repository
296298
with:
297299
comment-id: ${{ steps.find-comment.outputs.comment-id }}
298300
issue-number: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)