Skip to content

Commit 2ac56a2

Browse files
committed
dev-inf: Use pull_request_target for Claude Code review action
Previously, the Claude Code PR Review GitHub Action used the pull_request trigger, which runs in the context of the PR branch. This prevents GitHub from injecting OIDC tokens when the PR comes from a forked repository, causing authentication failures with Google Cloud's Workload Identity Federation. This change updates the workflow to use pull_request_target instead, which runs in the context of the base repository. This allows OIDC tokens to be injected even for fork PRs, enabling authentication with Google Cloud for Vertex AI access. Our standard git flow requires developers to create PRs from forks, so this change is necessary for the action to function in our development workflow. The workflow is safe to run with pull_request_target because it does not check out the PR branch - all PR content is fetched safely via the GitHub API using 'gh pr diff' and 'gh pr view'. Release note: None Epic: None
1 parent f0c3043 commit 2ac56a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/pr-analyzer-threestage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Claude Code PR Review
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [synchronize, ready_for_review, reopened, labeled]
66

77
jobs:

0 commit comments

Comments
 (0)