Skip to content

Commit bd0e228

Browse files
authored
ci(claude-review): fork PR에서 OIDC 토큰 실패 방지 (#697)
GitHub는 cross-repository(fork) PR에서 보안상의 이유로 `id-token: write` 권한을 차단한다. 이로 인해 anthropics/claude-code-action이 OIDC 토큰을 요청할 때 `Unable to get ACTIONS_ID_TOKEN_REQUEST_URL`로 실패한다. 예: PR #690 (fork user: gbrinan) → claude-review 체크 fail. job에 `if: github.event.pull_request.head.repo.full_name == github.repository` 조건을 추가해 fork PR에서는 job 자체가 skipped로 표시되도록 한다. Fork PR의 코드 리뷰는 `@claude` 멘션 기반의 claude.yml 워크플로우로 수동 트리거할 수 있다. 영향 범위: CI 설정 1파일. 내부 PR 동작은 변하지 않음. 🗿 MoAI <email@mo.ai.kr>
1 parent 6768568 commit bd0e228

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ concurrency:
1616

1717
jobs:
1818
claude-review:
19+
# C5 Fix: Skip fork PRs. GitHub blocks `id-token: write` on cross-repository
20+
# PRs for security reasons, causing OIDC token acquisition to fail with
21+
# `Unable to get ACTIONS_ID_TOKEN_REQUEST_URL`. Example: PR #690.
22+
# Fork PR reviews should be triggered manually via `@claude` on `claude.yml`.
23+
if: github.event.pull_request.head.repo.full_name == github.repository
24+
1925
# Optional: Filter by PR author
2026
# if: |
2127
# github.event.pull_request.user.login == 'external-contributor' ||

0 commit comments

Comments
 (0)