Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6b3cf03
feat: add pr-auto-review.yml workflow (compliance automation Phase 2)
don-petry Jun 1, 2026
252f48b
fix(bot): address bot feedback [skip ci-relay]
donpetry-bot Jun 1, 2026
9bf671d
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
fdd9d05
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
f6127be
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
3cf003c
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
572a3de
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
cbeb27b
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
d64d3a3
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
b720bb0
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
0d40cfe
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
76e3d3a
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
3dcd9c5
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
371c9f5
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
8dbad49
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
506987b
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
a1e382c
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
e7ed9c5
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
484336e
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
1659207
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
b760418
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
05eff3c
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
e02516d
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
e1acf29
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
8d79c96
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
9c82e7f
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
54e9cbb
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
f72f9ee
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
86799d7
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
c3bb23f
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
de809d1
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
56fa6d6
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
8b0f36b
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
974d702
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
3946077
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
3b05be3
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
c8d614a
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
dd6e595
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
9562bae
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
7d5cd94
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
1774e2a
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
db2362f
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
76050ec
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
9c29b24
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
dba9471
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
3e4259b
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
cccd4f6
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
963e51c
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
368a4e0
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
c55445b
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
56aa1a2
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
4dc298a
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
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
61 changes: 61 additions & 0 deletions .github/workflows/pr-auto-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ─────────────────────────────────────────────────────────────────────────────
# 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 tag in the `uses:` line when upgrading the reusable
# workflow version (e.g. bump `@v2` → `@v3` when petry-projects/.github cuts
# a new release), and the workflow name(s) in `workflow_run.workflows` to
# match your repository's CI workflow name(s).
# • You MUST NOT change: 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.
# • When publishing a new version of this reusable, also update this template
# and open a fanout PR across all caller repos.
# ─────────────────────────────────────────────────────────────────────────────
#
# 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.
workflow_run:
workflows: ['Node.js Tests', 'CI Pipeline']
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:
Comment thread
don-petry marked this conversation as resolved.
types: [opened, reopened, synchronize, ready_for_review]

permissions: {}

jobs:
pr-auto-review:
# Skip fork PRs on pull_request and pull_request_review events — forks don't
# receive org secrets, so GH_PAT_WORKFLOWS would be empty and the reusable's
# gh api calls would fail. Other triggers (workflow_run, check_suite) always
# run in the base-repo context and have full secret access.
if: >
(github.event_name != 'pull_request' && github.event_name != 'pull_request_review') ||
github.event.pull_request.head.repo.fork == false
Comment on lines +52 to +54

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip Dependabot PR events before using secrets

For pull_request events opened or synchronized by Dependabot, this fork-only guard still lets same-repo Dependabot PRs call the reusable workflow, but GitHub treats Dependabot-triggered pull_request workflows like forked PRs and withholds normal Actions secrets (see GitHub's Dependabot on Actions docs). In that scenario GH_PAT_WORKFLOWS is empty, so the reusable's API calls fail instead of cleanly waiting for a privileged trigger; either skip github.actor == 'dependabot[bot]' here or provide an identically named Dependabot secret.

Useful? React with 👍 / 👎.

permissions:
pull-requests: read
checks: read
actions: read
uses: petry-projects/.github/.github/workflows/pr-auto-review-reusable.yml@v2
secrets:
GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_WORKFLOWS }}
32 changes: 0 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,3 @@ playwright-report/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
Loading