Skip to content

Commit d956a13

Browse files
committed
Don't post PR comment on forks - the token has only read permissions
1 parent 8a5cd18 commit d956a13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/preview_release_notes.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
- name: Summarize results
3535
run: cat release_notes_tmp.md >> $GITHUB_STEP_SUMMARY
3636
- name: Update PR comment
37-
if: github.event_name == 'pull_request'
37+
# If the PR is from a fork, we cannot update the comment using read only permissions
38+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
3839
run: gh issue comment $ISSUE --edit-last --create-if-none --body-file release_notes_tmp.md
3940
env:
4041
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)