fix(ci): handle fork PRs in GitHub Actions workflows
Fork-based PRs (like PR #498) caused all CI checks to fail due to: - ci-quality-gate: checkout failed because fork branch names don't exist in the base repo. Now uses commit SHA for PR events. - skill-security-audit: comment posting failed with read-only GITHUB_TOKEN. Now continues on error and writes results to job summary as fallback. - claude-code-review: fallback comment step failed silently. Now continues on error and writes status to job summary. https://claude.ai/code/session_01X1RKFAkEwxgg6gQvJG1KCa
This commit is contained in:
11
.github/workflows/claude-code-review.yml
vendored
11
.github/workflows/claude-code-review.yml
vendored
@@ -114,6 +114,7 @@ jobs:
|
||||
|
||||
- name: Post fallback review note (quota/timeout)
|
||||
if: steps.claude-review.outcome != 'success'
|
||||
continue-on-error: true # Fork PRs have read-only GITHUB_TOKEN
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
@@ -129,3 +130,13 @@ jobs:
|
||||
- Proceed with manual review to unblock
|
||||
`
|
||||
})
|
||||
|
||||
- name: Write review status to job summary
|
||||
if: steps.claude-review.outcome != 'success'
|
||||
run: |
|
||||
echo "## ⚠️ Automated Review Skipped" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "The Claude review could not complete." >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "For fork PRs this is expected — OIDC tokens are unavailable." >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "- Retry from the Actions tab, or proceed with manual review." >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
Reference in New Issue
Block a user