From 56d9174bb5f6c548ade3f2963f10165b08fb67b9 Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:59:19 -0500 Subject: [PATCH] Update and rename main.yml to review.yml --- .github/workflows/main.yml | 22 ---------------------- .github/workflows/review.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/review.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index a6bf7107..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Code Review - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - review: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: pacnpal/claude-code-review-action@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }} - pr-number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 00000000..ddaaa837 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,34 @@ +name: Claude Code Review + +permissions: + contents: read + pull-requests: write + +on: + # Run on new/updated PRs + pull_request: + types: [opened, reopened, synchronize] + + # Allow manual triggers for existing PRs + workflow_dispatch: + inputs: + pr_number: + description: 'Pull Request Number' + required: true + type: string + +jobs: + code-review: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run Claude Review + uses: pacnpal/claude-code-review@v1.0.6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }} + pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}