Skip to content

Commit 9b4670b

Browse files
ci: harden pr coverage comment permissions
add explicit issues write permission and skip comment posting for fork prs to avoid 403 integration errors
1 parent 307a8a8 commit 9b4670b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
permissions:
1111
contents: read
1212
pull-requests: write
13+
issues: write
1314
actions: read
1415

1516
jobs:
@@ -92,7 +93,8 @@ jobs:
9293
find coverage-artifacts/ -name "*.json" -o -name "*.lcov" -o -name "*.xml" 2>/dev/null || echo "No coverage artifacts found"
9394
9495
- name: Post coverage comment on PR
95-
if: github.event_name == 'pull_request'
96+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
97+
continue-on-error: true
9698
uses: actions/github-script@v7
9799
with:
98100
script: |

0 commit comments

Comments
 (0)