From 7b6ecd4784d40ea6659dd8ca32a67d12cd5e88e1 Mon Sep 17 00:00:00 2001 From: Claude Code Bot Date: Sat, 18 Apr 2026 12:40:16 -0700 Subject: [PATCH] chore: restore self-applying caller so PRs produce the required status check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branch protection on main requires the `claude-review / run-review` status check, but no workflow in this repo produces it. The caller that used to produce it (.github/workflows/claude-code-review.yml) was removed in commit 52e688b as part of the v1 rename, and nothing was added back. Since then every PR (#33–#36, #39) has been BLOCKED on main's branch protection and only mergeable via `--admin`, losing both the enforcement and the dogfooding of the reusable workflow on its own changes. Add .github/workflows/self-review.yml, a minimal caller that: - Triggers on pull_request (opened/synchronize/ready_for_review/reopened) - Invokes the reusable workflow via LOCAL path (./.github/workflows/...) so PR branches review their proposed changes to the reusable workflow against themselves before release. A tag-pinned reference (@v1) would run the released version instead and miss bugs introduced in the PR. - Names the calling job `claude-review`, matching the required status check name `claude-review / run-review` in branch protection. - Passes repo-specific extra_instructions flagging the sensitive surfaces in this repo: shell-injection in PR-data interpolation, verdict contract stability, allowed-tools broadening, and the escape-hatch regex (which just bit us in #38). No functional changes to the reusable workflow itself. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/self-review.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/self-review.yml diff --git a/.github/workflows/self-review.yml b/.github/workflows/self-review.yml new file mode 100644 index 0000000..bcc2597 --- /dev/null +++ b/.github/workflows/self-review.yml @@ -0,0 +1,38 @@ +name: Self-Review + +# Self-applying caller: runs this repo's reusable Claude Blocking Review +# workflow on its own PRs. Produces the `claude-review / run-review` status +# check that branch protection requires on main. +# +# Uses a local path (./.github/workflows/claude-blocking-review.yml) rather +# than a tag, so PR branches dogfood the proposed changes to the reusable +# workflow against themselves before release. +# +# Replaces the .github/workflows/claude-code-review.yml caller that was +# deleted in commit 52e688b during the v1 rename. + +permissions: + contents: read + pull-requests: write + issues: write + id-token: write + +on: + pull_request: + types: [opened, synchronize, ready_for_review, reopened] + +jobs: + claude-review: + uses: ./.github/workflows/claude-blocking-review.yml + with: + pr_number: ${{ github.event.pull_request.number }} + extra_instructions: | + This repository hosts the reusable `claude-blocking-review.yml` + workflow itself. Pay particular attention to: + - Shell-injection risk in any step that interpolates PR data + - Changes to the verdict file / comment parsing contract that + consumer repos depend on + - Changes to allowed-tools that could broaden what Claude can run + - Grep/regex changes in the escape-hatch path (see #38 history) + secrets: + claude_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}