Skip to content

Slice 2: postCodeReviewResults.sh + run-claude-action composite#68

Draft
kacper-mikolajczak wants to merge 2 commits into
Expensify:mainfrom
kacper-mikolajczak:slice2
Draft

Slice 2: postCodeReviewResults.sh + run-claude-action composite#68
kacper-mikolajczak wants to merge 2 commits into
Expensify:mainfrom
kacper-mikolajczak:slice2

Conversation

@kacper-mikolajczak
Copy link
Copy Markdown
Contributor

@kacper-mikolajczak kacper-mikolajczak commented May 26, 2026

Details

Slice 2 of the Claude reviewer centralisation effort. Two additions, both designed so the client claude-review.yml workflows collapse the duplication that remained after slice 1.

1. claude-review-toolkit/scripts/postCodeReviewResults.sh - centralises the violations post-processing loop currently duplicated across all three client workflows. Reads STRUCTURED_OUTPUT from env, takes PR_NUMBER as positional arg, posts a +1 reaction on zero violations or N inline comments via createInlineComment.sh otherwise. Empty STRUCTURED_OUTPUT -> ::error:: + exit 1.

2. run-claude-action composite action - pins anthropics/claude-code-action@ba026a3e (v1.0.86) at a single place. Inputs: anthropic_api_key, github_token, prompt (required); claude_args, allowed_non_write_users (default *), display_report (default "true") (optional). Output: structured_output passthrough. Model selection lives in claude_args per caller because today's three client repos disagree (App: explicit --model claude-opus-4-6; Auth & Web: CLI default Sonnet).

Related Issues

https://github.com/Expensify/Expensify/issues/635397

Manual Tests

postCodeReviewResults.sh smoke-tested locally with mocked addPrReaction.sh / createInlineComment.sh on PATH:

  • 0 violations -> single +1 reaction call
  • 2 violations -> 2 inline-comment calls with correct path/body/line args
  • Body with backticks + embedded double-quotes -> preserved intact
  • Empty STRUCTURED_OUTPUT -> ::error:: + exit 1
  • Non-numeric or missing PR_NUMBER -> usage error + exit 1

run-claude-action: end-to-end exercised via the three client adoption PRs linked below.

Linked PRs

Client adoption PRs (drafts; reference this PR by placeholder SHA, re-stamped on merge):

Centralises the violations post-processing loop currently duplicated
across Expensify/App, Expensify/Auth, and Expensify/Web-Expensify's
claude-review.yml workflows. The script reads STRUCTURED_OUTPUT from
env, adds a +1 reaction when there are no violations, and otherwise
posts one inline comment per violation via createInlineComment.sh.
Single composite step pinning anthropics/claude-code-action@ba026a3e
(v1.0.86) with common defaults: anthropic_api_key, github_token,
allowed_non_write_users ("*"), display_report ("true"). Model
selection lives in claude_args - App passes --model claude-opus-4-6
explicitly; Auth and Web-Expensify rely on the CLI default (Sonnet
today).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant