Skip to content

Commit 7b6ecd4

Browse files
Claude Code Botclaude
andcommitted
chore: restore self-applying caller so PRs produce the required status check
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) <noreply@anthropic.com>
1 parent 13bb616 commit 7b6ecd4

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/self-review.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Self-Review
2+
3+
# Self-applying caller: runs this repo's reusable Claude Blocking Review
4+
# workflow on its own PRs. Produces the `claude-review / run-review` status
5+
# check that branch protection requires on main.
6+
#
7+
# Uses a local path (./.github/workflows/claude-blocking-review.yml) rather
8+
# than a tag, so PR branches dogfood the proposed changes to the reusable
9+
# workflow against themselves before release.
10+
#
11+
# Replaces the .github/workflows/claude-code-review.yml caller that was
12+
# deleted in commit 52e688b during the v1 rename.
13+
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
issues: write
18+
id-token: write
19+
20+
on:
21+
pull_request:
22+
types: [opened, synchronize, ready_for_review, reopened]
23+
24+
jobs:
25+
claude-review:
26+
uses: ./.github/workflows/claude-blocking-review.yml
27+
with:
28+
pr_number: ${{ github.event.pull_request.number }}
29+
extra_instructions: |
30+
This repository hosts the reusable `claude-blocking-review.yml`
31+
workflow itself. Pay particular attention to:
32+
- Shell-injection risk in any step that interpolates PR data
33+
- Changes to the verdict file / comment parsing contract that
34+
consumer repos depend on
35+
- Changes to allowed-tools that could broaden what Claude can run
36+
- Grep/regex changes in the escape-hatch path (see #38 history)
37+
secrets:
38+
claude_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

0 commit comments

Comments
 (0)