From a083bdaad0cac2044136a7c7ac8c2634da23d460 Mon Sep 17 00:00:00 2001 From: km-anthropic Date: Wed, 30 Jul 2025 17:21:08 -0700 Subject: [PATCH] feat: add review mode workflow for testing --- .github/workflows/claude-review-mode.yml | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/claude-review-mode.yml diff --git a/.github/workflows/claude-review-mode.yml b/.github/workflows/claude-review-mode.yml new file mode 100644 index 0000000..6ee9c5a --- /dev/null +++ b/.github/workflows/claude-review-mode.yml @@ -0,0 +1,45 @@ +name: Claude Review Mode + +on: + pull_request: + types: [opened, synchronize] + issue_comment: + types: [created] + +jobs: + code-review: + # Run on PR events, or when someone comments "@claude review" on a PR + if: | + github.event_name == 'pull_request' || + (github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '@claude review')) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + # Note: id-token not needed since review mode doesn't use OIDC for GitHub auth + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Full history for better diff analysis + + - name: Code Review with Claude + uses: km-anthropic/claude-code-action@main + with: + mode: review + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + # github_token not needed - uses default GITHUB_TOKEN for GitHub operations + timeout_minutes: "30" + custom_instructions: | + Focus on: + - Code quality and maintainability + - Security vulnerabilities + - Performance issues + - Best practices and design patterns + - Test coverage gaps + + Be constructive and provide specific suggestions for improvements. + Use GitHub's suggestion format when proposing code changes. \ No newline at end of file