Add Claude review workflow for Nexus team PRs#10420
Open
stephanos wants to merge 9 commits into
Open
Conversation
Triggers anthropics/claude-code-action on PR open when the author is an active member of the temporalio/nexus team. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Trigger on opened/reopened/ready_for_review; skip drafts - Switch to pull_request_target so forked PRs from team members work - Move permissions to the review job; drop unused id-token - Add timeout-minutes to both jobs - Distinguish 404 (not a member) from real gh api errors - Explicitly check out PR head SHA after the team-membership gate Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Satisfies security.gha.missing-explicit-permissions lint. The job uses TEAM_READ_TOKEN exclusively and needs no GITHUB_TOKEN scopes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c8bc8d1 to
58f8047
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lets you fire the workflow against an arbitrary open PR without merging:
gh workflow run claude-review-teams.yml \
--ref stephanos/claude-nexus-pr-review -f pr_number=10420
The resolve step uses GITHUB_TOKEN (pull-requests: read) to look up the
PR's author and head SHA, then the membership check uses TEAM_READ_TOKEN
as before.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Avoids introducing a new PAT secret; reuses the existing GitHub App credentials (TEMPORAL_CICD_APP_ID, TEMPORAL_CICD_PRIVATE_KEY) already used by ci-success-report.yml. The same token serves both the PR lookup (workflow_dispatch path) and the org team-membership check. Per Tom: app needs members:read on org permissions for team lookups to succeed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Leaves workflow_dispatch as the only trigger so we can validate the workflow against real PRs without auto-firing on every new PR. Re-enable the auto-trigger once end-to-end behavior is confirmed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
stephanos
commented
May 29, 2026
| # workflow end-to-end via workflow_dispatch. Re-enable once we've confirmed | ||
| # the membership check and review behave as expected on real PRs. | ||
| # pull_request_target: | ||
| # types: [opened, reopened, ready_for_review] |
Contributor
Author
There was a problem hiding this comment.
no way to test this without merging, so disabling for now ...
Confine the generated token to members:read (team lookups) and pull-requests:read (workflow_dispatch PR lookup) instead of the app's full installation permissions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
S15
reviewed
May 29, 2026
|
|
||
| jobs: | ||
| check-membership: | ||
| if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false |
Contributor
There was a problem hiding this comment.
with PR target enabled, does this end up running on every push that isn't a draft? just making sure I'm reading it right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Added new GitHub Action workflow to request Claude Code review on a PR.
Why?
The goal is to automate this, but for now we'll test it manually first, ie
workflow_dispatch.