Skip to content

chore(ci): review every org-authored PR automatically - #190

Merged
jfrench9 merged 1 commit into
mainfrom
chore/claude-pr-review
Aug 15, 2026
Merged

chore(ci): review every org-authored PR automatically#190
jfrench9 merged 1 commit into
mainfrom
chore/claude-pr-review

Conversation

@jfrench9

Copy link
Copy Markdown
Member

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.

Adds a pull_request trigger to the Claude review workflow so every PR opened
by an org member is reviewed without anyone remembering to ask. This is the
compensating change-management control for SOC 2 CC8.1: a sole maintainer
cannot approve their own pull request, so an automatic second reader stands
in for independent review.

Also adds the author_association gate that this repo was missing entirely.
The workflow is public and previously ran for any commenter. Outside
contributors are now excluded on two independent checks - the head-repo test
rejects fork PRs outright, and author_association rejects CONTRIBUTOR/NONE -
so no one outside the org can invoke Claude or drain Claude usage.

The review posts findings as a comment and does not approve. An unconditional
bot approval on every PR would be a rubber stamp and worse audit evidence
than the documented exception it would replace.
@jfrench9
jfrench9 merged commit 0af45b2 into main Aug 15, 2026
2 checks passed
@jfrench9
jfrench9 deleted the chore/claude-pr-review branch August 15, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant