From b55ac1b924852063570bb8ece6415e7601761f65 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 23:10:07 +0000 Subject: [PATCH] ci: allow manual Claude review runs with optional full output Adds a workflow_dispatch trigger taking a PR number and a show_full_output toggle, for debugging why a review skipped a PR. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Pe7k1XG8178GSmRsq1KkAR --- .github/workflows/claude-code-review.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 97e0c13..1e9b987 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -3,15 +3,27 @@ name: Claude Code Review on: pull_request: types: [opened, synchronize, ready_for_review, reopened] + # manual re-run from the Actions tab (or `gh workflow run`) + workflow_dispatch: + inputs: + pr_number: + description: 'PR number to review' + required: true + type: number + show_full_output: + description: "Show Claude's full output in the job log (visible to anyone who can see the run)" + required: false + default: false + type: boolean concurrency: - group: claude-review-${{ github.event.pull_request.number }} + group: claude-review-${{ github.event.pull_request.number || inputs.pr_number }} cancel-in-progress: true jobs: claude-review: # skip drafts; review once marked ready - if: github.event.pull_request.draft == false + if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: contents: read @@ -24,6 +36,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 1 + ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr_number) || '' }} - name: Run Claude Code Review uses: anthropics/claude-code-action@v1 @@ -31,4 +44,5 @@ jobs: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} --comment' + show_full_output: ${{ inputs.show_full_output == true }} + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number || inputs.pr_number }} --comment'