Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/pr-auto-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ─────────────────────────────────────────────────────────────────────────────
# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/pr-auto-review.yml
# Standard: petry-projects/.github/standards/ci-standards.md
# Reusable: petry-projects/.github/.github/workflows/pr-auto-review-reusable.yml
#
# AGENTS — READ BEFORE EDITING:
# • This file is a THIN CALLER STUB. All readiness-gate logic lives in the
# reusable workflow above.
# • You MAY change: the workflow name(s) in `workflow_run.workflows` to match
# your repository's CI workflow name(s).
# • You MUST NOT change: the `@pr-auto-review/stable` channel in the `uses:`
# line — this reusable is on the org-wide moving-channel model (rollout and
# rollback are a single central tag move; a frozen `@vN`/`@<sha>` pin is
# rejected by the compliance audit). Nor the trigger event types or the
# job-level `permissions:` block — reusable workflows can be granted no more
# permissions than the calling job, so removing the stanza breaks the
# reusable's gh API calls.
# • If you need different behaviour, open a PR against the reusable in the
# central repo. The change will propagate everywhere on next run.
# ─────────────────────────────────────────────────────────────────────────────
#
# PR Auto-Review — thin caller for the org-level reusable.
# To adopt: copy this file to .github/workflows/pr-auto-review.yml in your repo.
# Requires: GH_PAT_WORKFLOWS org secret (already present in petry-projects org).
name: PR Auto-Review — Ready Check

on:
# workflow_run fires when a named GitHub Actions workflow completes.
# check_suite does NOT trigger for GitHub Actions runs, so this is required
# to catch CI turning green on a PR.
# TODO: replace "CI" with your repository's CI workflow name(s).
workflow_run:
workflows: ["CI"]
types: [completed]
# check_suite covers third-party CI checks (e.g. SonarCloud, external apps).
check_suite:
types: [completed]
# Re-evaluate readiness after review state changes.
pull_request_review:
types: [submitted, dismissed]
# Re-evaluate when the PR is first opened, updated, or comes out of draft.
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

permissions: {}

jobs:
pr-auto-review:
permissions:
pull-requests: read
checks: read
actions: read
uses: petry-projects/.github/.github/workflows/pr-auto-review-reusable.yml@pr-auto-review/v1-next # NOSONAR(githubactions:S7637) first-party channel ref
secrets:
# Canonical-first fallback (.github-private#1326). The reusable resolves this
# secret BY NAME, so only the VALUE changes — the passed key stays named
# GH_PAT_WORKFLOWS.
GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}
Loading