Skip to content

[IM-3530] Make claude-review.yml reusable and configurable#23

Merged
jaysonv0341 merged 1 commit intomainfrom
improve/claude-review-reusable
Mar 9, 2026
Merged

[IM-3530] Make claude-review.yml reusable and configurable#23
jaysonv0341 merged 1 commit intomainfrom
improve/claude-review-reusable

Conversation

@gobetti
Copy link
Contributor

@gobetti gobetti commented Mar 9, 2026

Summary

  • Adds extra_prompt, timeout_minutes inputs so callers can customize behavior without forking the workflow
  • Embeds a full, generic review rubric (security, compliance, data/migrations, performance, testing, APIs, dependencies) — platform/framework-specific content removed to keep it repo-agnostic
  • Adds use_sticky_comment: true for a single updating PR comment
  • Removes github_token so comments are posted by the Claude bot instead of the GitHub Actions bot

Adoption

Repos with an existing standalone claude.yml can replace it with:

name: Claude Code – PR Review
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
jobs:
  review:
    uses: isapp/.github/.github/workflows/claude-review.yml@main
    secrets:
      ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
    with:
      max_turns: 25        # default: 15
      timeout_minutes: 25  # default: 15
      extra_prompt: |      # default: "" (nothing appended)
        ## Repo-Specific Rules
        - Example rule A

Test plan

  • Merge this PR, then update a repo (e.g. ht-android) to use the reusable workflow
  • Open a test PR in that repo and verify Claude bot posts a single sticky comment
  • Verify extra_prompt content appears in the review output

🤖 Generated with Claude Code


📝 Auto-filled

- Add `extra_prompt` input so callers can append repo-specific review
  rules without forking the workflow
- Add `timeout_minutes` input so callers can override the job timeout
  (default: 15) and now using that instead of the hardcoded 15
- Make `claude_args` use `${{ inputs.model }}` and
  `${{ inputs.max_turns }}` consistently
- Add `use_sticky_comment: true` so subsequent PR pushes update the
  existing review comment, instead of creating new ones
- Remove `github_token` so comments are posted by the Claude bot, not
  the GitHub Actions bot
- Embed the full review rubric directly in the prompt (security,
  compliance, data/migrations, performance, testing, APIs, dependencies)
  so callers inherit it automatically
- Strip all platform/framework-specific content from the base rubric (no
  iOS/Android, no specific linter names, no mobile-only bullet points)
  to keep it generic for all repos

To adopt in any repo (replacing an existing standalone claude.yml):

  # .github/workflows/claude.yml
  name: Claude Code – PR Review
  on:
    pull_request:
      types: [opened, synchronize, reopened, ready_for_review]
  jobs:
    review:
      uses: isapp/.github/.github/workflows/claude-review.yml@main
      secrets:
        ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
      with:
        # Optional — only specify what differs from the defaults:
        max_turns: 25        # default: 15
        timeout_minutes: 25  # default: 15
        extra_prompt: |      # default: "" (nothing appended)
          ## Repo-Specific Rules
          - Example rule A
          - Example rule B

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gobetti gobetti changed the title Make claude-review.yml fully reusable and configurable [IM-3530] Make claude-review.yml fully reusable and configurable Mar 9, 2026
@gobetti gobetti changed the title [IM-3530] Make claude-review.yml fully reusable and configurable [IM-3530] Make claude-review.yml reusable and configurable Mar 9, 2026
@jaysonv0341 jaysonv0341 merged commit 7d4acc6 into main Mar 9, 2026
1 check passed
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.

2 participants