Skip to content

Commit 58d3f06

Browse files
marc-barryclaude
andauthored
fix: gracefully handle fork PR comment permissions (#68)
PRs from forks run with a read-only GITHUB_TOKEN, which prevents posting PR comments. Add continue-on-error so the comment step fails gracefully without blocking the scan results. Scan results remain visible in the step summary. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 32cfc12 commit 58d3f06

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/container-scan.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
fs.writeFileSync('scan-result.json', JSON.stringify({ table, hasBlocking }));
8989
9090
- name: Post scan results as PR comment
91+
continue-on-error: true # Fork PRs have read-only tokens and cannot post comments
9192
if: github.event_name == 'pull_request'
9293
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
9394
env:

0 commit comments

Comments
 (0)