From b72b6cfcd82d661a757c2a448aa1a7647f078bc1 Mon Sep 17 00:00:00 2001 From: Risto Jamul Date: Tue, 21 Jul 2026 01:13:12 +0300 Subject: [PATCH] ci: add PR review dispatch stub Forwards review-request events to the org's centralized review automation, mirroring the existing release-dispatch workflow. No logic lives here; skips fork PRs. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01J77SSBPgEK4YWi5QocYHPS --- .github/workflows/pr-review-dispatch.yml | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr-review-dispatch.yml diff --git a/.github/workflows/pr-review-dispatch.yml b/.github/workflows/pr-review-dispatch.yml new file mode 100644 index 0000000..aa732a3 --- /dev/null +++ b/.github/workflows/pr-review-dispatch.yml @@ -0,0 +1,37 @@ +name: PR review dispatch + +# On a review request, hand off to the org's centralized review automation for +# this PR (mirrors release-dispatch.yml). ALL identity/decision logic lives in +# the private elnora-automation repo — this stub carries none (no usernames, no +# approval semantics), so it is safe to drop into public repos later. +# +# Skips fork PRs: pull_request from a fork gets no secrets, so the dispatch would +# fail; guarding on head.repo.fork == false makes those runs neutral (skipped), +# not a red check on external contributors' PRs. + +on: + pull_request: + types: [review_requested] + +permissions: + contents: read + +concurrency: + group: pr-review-dispatch-${{ github.event.pull_request.number }} + cancel-in-progress: false + +jobs: + dispatch: + if: github.event.pull_request.head.repo.fork == false + runs-on: ubuntu-latest + steps: + - name: Trigger centralized review automation + env: + GH_TOKEN: ${{ secrets.RELEASE_DISPATCH_TOKEN }} + PR: ${{ github.event.pull_request.number }} + run: | + jq -n --arg repo "${GITHUB_REPOSITORY#*/}" --arg pr "$PR" \ + '{ref:"main",inputs:{repo:$repo,pr:$pr}}' \ + | gh api --method POST \ + /repos/Elnora-AI/elnora-automation/actions/workflows/review-approve.yml/dispatches \ + --input -