From 014eb29e77fa229e173e5e05ebc2bbdd6e271f00 Mon Sep 17 00:00:00 2001 From: AI Agent Date: Sun, 18 Oct 2026 06:16:29 +0000 Subject: [PATCH 1/2] [PLA-2303] Report the human-review-policy status on PRs 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 --- .../human-review-policy-trigger.yaml | 17 ++++++++++++++++ .github/workflows/human-review-policy.yaml | 20 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/human-review-policy-trigger.yaml create mode 100644 .github/workflows/human-review-policy.yaml diff --git a/.github/workflows/human-review-policy-trigger.yaml b/.github/workflows/human-review-policy-trigger.yaml new file mode 100644 index 00000000..ede2589f --- /dev/null +++ b/.github/workflows/human-review-policy-trigger.yaml @@ -0,0 +1,17 @@ +name: Human review policy trigger +# No-op: its completion triggers human-review-policy.yaml, which runs from the +# default branch so that a PR cannot change the policy it is judged by. + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review, edited, closed] + pull_request_review: + types: [submitted, edited, dismissed] + +permissions: {} + +jobs: + trigger: + runs-on: ubuntu-latest + steps: + - run: echo "PR ${{ github.event.pull_request.number }} ${{ github.event_name }}" diff --git a/.github/workflows/human-review-policy.yaml b/.github/workflows/human-review-policy.yaml new file mode 100644 index 00000000..161a9677 --- /dev/null +++ b/.github/workflows/human-review-policy.yaml @@ -0,0 +1,20 @@ +name: Human review policy +# Reports the required `human-review-policy` status: 1 human approval besides +# the author on a human-authored PR, 2 on a bot-authored one; labels PRs merged +# past it (admin break glass) needs-post-merge-review. Triggered by +# human-review-policy-trigger.yaml; runs from the default branch so a PR cannot +# change the policy it is judged by. Details and options: +# https://github.com/rollbar/human-review-policy + +on: + workflow_run: + workflows: ["Human review policy trigger"] + types: [completed] + +jobs: + policy: + permissions: + contents: read + pull-requests: write + statuses: write + uses: rollbar/human-review-policy/.github/workflows/human-review-policy.yaml@main From b718c0030b789cc228531a0e5e875c22fb23e73b Mon Sep 17 00:00:00 2001 From: AI Agent Date: Sun, 18 Oct 2026 06:24:43 +0000 Subject: [PATCH 2/2] [PLA-2303] Report human-review-policy on merge groups too 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 --- .github/workflows/human-review-policy-trigger.yaml | 3 +++ .github/workflows/human-review-policy.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/human-review-policy-trigger.yaml b/.github/workflows/human-review-policy-trigger.yaml index ede2589f..f9f8f7b6 100644 --- a/.github/workflows/human-review-policy-trigger.yaml +++ b/.github/workflows/human-review-policy-trigger.yaml @@ -7,6 +7,9 @@ on: types: [opened, reopened, synchronize, ready_for_review, edited, closed] pull_request_review: types: [submitted, edited, dismissed] + # Repos with a merge queue: the merge group's commit needs the status too. + merge_group: + types: [checks_requested] permissions: {} diff --git a/.github/workflows/human-review-policy.yaml b/.github/workflows/human-review-policy.yaml index 161a9677..6065d765 100644 --- a/.github/workflows/human-review-policy.yaml +++ b/.github/workflows/human-review-policy.yaml @@ -8,7 +8,7 @@ name: Human review policy on: workflow_run: - workflows: ["Human review policy trigger"] + workflows: [Human review policy trigger] types: [completed] jobs: