From a9ca1eae95ab6174f9e856406c9654ee731fbeaa Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Mon, 3 Aug 2026 15:05:02 +0200 Subject: [PATCH] ci(pr-review): dispatch on PR open (standard review only) (#23708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why A PR opened directly as non-draft (the normal member flow: push branch → `gh pr create`) fires no dispatcher trigger — the initial commits arrived before the PR existed, so they're an `opened` event, not `synchronize`. With no `opened` trigger, such a PR gets **no review at all** unless it's later pushed to or manually labelled. This is live today: #23697 and #23707 are core-team PRs sitting with the bot's `-PR: draft` label but zero "PR Review" status. ## Change Add `opened` back to the dispatcher, and forward the triggering PR event to the orchestrator: ```yaml types: [opened, ready_for_review, synchronize, labeled] # ... -f pr_number="$PR_NUMBER" -f event="$EVENT" ``` The orchestrator (twentyhq/ci-privileged#65) maps **`opened` → standard review only**; `security` + `triage` stay on pushes / ready-for-review. So opening a PR gives core-team authors the standard (architectural) review early, without firing the full gate on open, and the "opened and never pushed again" hole is closed. No author-role logic lives here — the dispatcher just forwards `pr_number` + `event`; all who-gets-what policy is resolved in the orchestrator. ## Merge order Depends on **twentyhq/ci-privileged#65** (adds the `event` input). Merge that first — it's backward-compatible (empty `event` = today's auto-gate behaviour), so nothing breaks in between. Review in cubic --- .github/workflows/pr-review-dispatch.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-review-dispatch.yaml b/.github/workflows/pr-review-dispatch.yaml index e3c00d61ee..12b39806f0 100644 --- a/.github/workflows/pr-review-dispatch.yaml +++ b/.github/workflows/pr-review-dispatch.yaml @@ -3,7 +3,7 @@ run-name: "PR Review Dispatch #${{ github.event.pull_request.number }}" on: pull_request_target: - types: [ready_for_review, synchronize, labeled] + types: [opened, ready_for_review, synchronize, labeled] permissions: {} @@ -33,6 +33,8 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PR_NUMBER: ${{ github.event.pull_request.number }} + EVENT: ${{ github.event.action }} run: | gh workflow run pr-review.yaml --repo twentyhq/ci-privileged --ref main \ - -f pr_number="$PR_NUMBER" + -f pr_number="$PR_NUMBER" \ + -f event="$EVENT"