Repository navigation
Commit 0af45b2
authored
chore(ci): review every org-authored PR automatically (#190)
## Summary
Every pull request opened by an org member now gets an automatic Claude
review, and this repository's workflow gains the author gate it was
missing entirely.
The review is the compensating change-management control for SOC 2
CC8.1: a sole maintainer cannot approve their own pull request — GitHub
forbids self-approval — so an automatic second reader stands in for
independent review. This repo is one of three that previously had a
pull-request requirement with *nothing* verifying the change before
merge: no required status checks, and a `copilot_code_review` ruleset
rule that is configured but produces no reviews (verified: zero reviews
on the last three merged PRs here).
## Changes
**`.github/workflows/claude.yml`**
- Added a `pull_request` trigger on `[opened, ready_for_review]`. Not
`synchronize` — every push to an open PR would re-run the review.
- **Added the `author_association` gate, which this workflow did not
have.** It previously ran for any commenter mentioning `@claude`, on a
public repository. All four comment-driven arms are now restricted to
`OWNER`/`MEMBER`/`COLLABORATOR`.
- The new `pull_request` arm is guarded twice: `head.repo.full_name ==
github.repository` rejects fork PRs outright, and `author_association`
rejects `CONTRIBUTOR`/`NONE`. Stays on `pull_request` rather than
`pull_request_target`, so a fork PR carries no secrets regardless.
- Added a `concurrency` group keyed on the PR number with
`cancel-in-progress`.
- Added a conditional `prompt` with a review brief tuned to this repo —
it calls out the post-1.0 two-tier SDK contract, so the reviewer flags
anything touching the stable tier that would require a coordinated
client major. Left empty for comment-driven events. The brief instructs
it to post findings as a comment and **not** to approve.
## Breaking Changes
None. CI configuration only — no change to any published symbol, and
neither tier of the SDK contract is touched.
## Testing
Workflow YAML validated by parsing with `yaml.safe_load` and asserting
the trigger set, gate count, fork check, and concurrency block. Repo
pre-commit hooks passed (lint, format, typecheck, full unit suite).
This PR is itself the first live exercise of the new trigger.1 file changed
Lines changed: 34 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
15 | 32 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
| |||
41 | 63 | | |
42 | 64 | | |
43 | 65 | | |
44 | | - | |
45 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
46 | 74 | | |
47 | 75 | | |
48 | 76 | | |
| |||
0 commit comments