feat(claude): add commands for CLAUDE.md initialization and updates #43
Workflow file for this run
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
| name: Claude Code Review | |
| # Automated PR code reviews using Claude AI | |
| # | |
| # This workflow provides: | |
| # - Formal GitHub reviews (APPROVE/REQUEST_CHANGES/COMMENT) | |
| # - Inline comments on specific lines of code | |
| # - Auto-resolution of fixed issues on subsequent reviews | |
| # - Patch-ID based caching to skip rebases (no duplicate reviews) | |
| # - Iterative review tracking of previous comments | |
| # | |
| # The review uses the default prompt from this repository's | |
| # .github/prompts/default-pr-review.md | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review] | |
| # Ensure only one review runs at a time per PR | |
| # New reviews wait for the current one to complete before starting | |
| concurrency: | |
| group: claude-review-${{ github.event.pull_request.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| claude-review: | |
| # Skip merge queue PRs and draft PRs | |
| if: | | |
| !contains(github.head_ref, 'gh-readonly-queue/') && | |
| (github.event.pull_request.draft == false || github.event.action == 'ready_for_review') | |
| uses: ./.github/workflows/_claude-code-review.yml | |
| with: | |
| pr_number: ${{ github.event.pull_request.number }} | |
| base_ref: ${{ github.base_ref }} | |
| # Use default model (Sonnet 4.5) for cost-effective reviews | |
| # Uncomment one of these to use a different model for reviews: | |
| model: 'claude-haiku-4-5' | |
| # model: 'claude-sonnet-4-5' | |
| # model: 'claude-opus-4-1' | |
| # Allow standard review conversation turns | |
| # max_turns: 15 | |
| # Standard timeout for most PRs | |
| timeout_minutes: 20 | |
| # Optional: Restrict tools for read-only reviews (uncomment to enable) | |
| # allowed_tools: 'Read,Grep,Glob,Bash(git log),Bash(git diff),Bash(git show)' | |
| secrets: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| # Auto-merge Dependabot security updates after successful review | |
| auto-merge-dependabot: | |
| needs: claude-review | |
| if: | | |
| github.actor == 'dependabot[bot]' && | |
| (contains(github.event.pull_request.title, 'security') || contains(github.event.pull_request.title, 'Bump')) && | |
| needs.claude-review.result == 'success' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Enable auto-merge for Dependabot updates | |
| run: gh pr merge --auto --squash "$PR_NUMBER" | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} |