Repository navigation
[PLA-2303] Report the human-review-policy status on PRs - #384
Open
devtools-agent[bot] wants to merge 2 commits into
Open
devtools-agent[bot] wants to merge 2 commits into
devtools-agent[bot] wants to merge 2 commits into
Conversation
Adds the two caller workflows for rollbar/human-review-policy: a no-op trigger on PR and review events, and a workflow_run workflow (always run from master) that posts the human-review-policy commit status: 1 human approval besides the author on a human-authored PR, 2 on a bot-authored one. PRs merged without meeting it are labelled needs-post-merge-review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Trigger on merge_group so a merge queue isn't left waiting for the required status, and write the workflow name unquoted so Prettier accepts it whatever the repo's quote style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI Agent Review (openai, openai-astra)Review of the This PR adds two workflows:
What I checked in this checkout:
Stated dependencies, not checked:
Non-blocking notes (no change required in this PR):
As the description says ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: PLA-2303
What changed
Adds the two caller workflows for the shared
human-review-policycheck from rollbar/human-review-policy. That repo is public so SDK repos can use it; the private repos use the same code through rollbar/github-workflows#130..github/workflows/human-review-policy-trigger.yaml: a no-op that runs on PR events (opened, reopened, synchronize, ready_for_review, edited, closed) and review events (submitted, edited, dismissed)..github/workflows/human-review-policy.yaml: runs onworkflow_runof the trigger and calls the reusable workflow, which posts ahuman-review-policycommit status on the PR's head commit.The status passes with 1 human approval besides the author on a human-authored PR and 2 distinct human approvals on a bot-authored one (e.g.
devtools-agent[bot]). That way every production PR has two distinct humans on it. Approvals from bots androllbar-circleci-machinedon't count. Pushing commits to a PR doesn't stop someone from approving it.Post-merge tracking: if a PR is merged without meeting the policy, e.g. through an admin break-glass bypass, it gets the
needs-post-merge-reviewlabel and a comment saying how many approvals it still needs. Reviewers can still approve a merged PR. Once the policy is met, the label is removed and a closing comment is posted. To list what's still owed:is:pr is:merged label:needs-post-merge-review org:rollbar.Why two files
pull_requestworkflows run the YAML from the PR's own branch, so a PR could rewrite the check that judges it.workflow_runworkflows always run the copy onmaster. If a PR breaks the trigger, the status is never updated and the PR stays blocked.Rollout order
Human review policyruns here fail with "workflow not found". That's harmless, but noisy.human-review-policy.yamlis onmaster, becauseworkflow_runonly fires for workflows that are on the default branch.ruleset.json:gh api -X POST repos/rollbar/rollbar-java/rulesets --input ruleset.json. Org and repo admins can bypass it through a PR for incidents (break glass); post-merge review is required in those cases.Not part of this PR: the ruleset itself (step 3).
Pull requests from forks
These work. The trigger runs on the fork PR, and the evaluation runs in this repo with this repo's token, finding the PR by its head branch. If first-time contributors need approval before their workflows run, the status appears once a maintainer approves the trigger run.
Merge queues
The trigger also runs on
merge_group, so in repos with a merge queue the status is written on each merge group's commit as well, and the queue isn't left waiting for it.Validation
🤖 Generated with Claude Code