| 1 |
name: Claude Code |
| 2 |
|
| 3 |
# GITHUB_TOKEN needs contents:read and actions:read — required by |
| 4 |
# claude-code-action for restoring trusted config files from the base branch. |
| 5 |
# All other GitHub API access uses the App token. |
| 6 |
permissions: |
| 7 |
contents: read |
| 8 |
actions: read |
| 9 |
|
| 10 |
on: |
| 11 |
issue_comment: |
| 12 |
types: [created] |
| 13 |
pull_request_review_comment: |
| 14 |
types: [created] |
| 15 |
pull_request_target: |
| 16 |
types: [opened, reopened] |
| 17 |
|
| 18 |
jobs: |
| 19 |
claude: |
| 20 |
name: Claude Review |
| 21 |
uses: synadia-io/ai-workflows/.github/workflows/claude.yml@v2 |
| 22 |
if: contains( |
| 23 |
fromJson('["OWNER","MEMBER","COLLABORATOR"]'), |
| 24 |
github.event.comment.author_association || github.event.pull_request.author_association |
| 25 |
) |
| 26 |
with: |
| 27 |
gh_app_id: ${{ vars.CLAUDE_GH_APP_ID }} |
| 28 |
checkout_mode: "base" |
| 29 |
# review_focus is used only by the auto-review job (pull_request_target), not the |
| 30 |
# interactive @claude job — so the check below only needs github.event.pull_request, |
| 31 |
# which pull_request_target populates. On issue_comment events that field is absent, |
| 32 |
# so this evaluates to startsWith(null, 'backports/') -> false; harmless, since the |
| 33 |
# interactive job ignores review_focus. Can't be fixed in-expression: issue_comment |
| 34 |
# payloads carry no head ref at all. |
| 35 |
review_focus: | |
| 36 |
${{ startsWith(github.event.pull_request.head.ref, 'backports/') && ' |
| 37 |
This is a BACKPORT / RELEASE pull request. Every cherry-picked commit |
| 38 |
originates from a PR that was already independently reviewed and approved |
| 39 |
on the source branch. Do NOT re-review the individual code changes and do |
| 40 |
NOT comment on the implementation of cherry-picked hunks — assume they are |
| 41 |
correct. |
| 42 |
|
| 43 |
Instead, focus exclusively on: |
| 44 |
- Cherry-pick completeness. Inspect the PRs/commits included in this |
| 45 |
backport. For each source PR, check its milestone, labels, and target |
| 46 |
branch to decide whether it belongs in this release line. Flag any PR |
| 47 |
that targets this release but is MISSING here, and any included PR that |
| 48 |
does not belong. |
| 49 |
- Non-clean picks. Call out commits that appear to have been modified |
| 50 |
during the cherry-pick (conflict resolution, adapted context) — those |
| 51 |
are the only changes that warrant a closer look. |
| 52 |
- Release overview. Produce a concise summary of what this release ships, |
| 53 |
grouped by area (JetStream, Raft/NRG, leafnodes, security, etc.), so |
| 54 |
reviewers can sanity-check the scope at a glance. |
| 55 |
' || ' |
| 56 |
Additionally focus on: |
| 57 |
- Performance implications (hot paths, allocations, lock contention) |
| 58 |
- Concurrency safety (goroutine leaks, race conditions, deadlocks) |
| 59 |
- Raft consensus and JetStream clustering correctness |
| 60 |
- Security boundaries (authentication, authorization, TLS handling) |
| 61 |
' }} |
| 62 |
secrets: |
| 63 |
claude_oauth_token: ${{ secrets.CLAUDE_OAUTH_TOKEN }} |
| 64 |
gh_app_private_key: ${{ secrets.CLAUDE_GH_APP_PRIVATE_KEY }} |