Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
666b2e3
feat: add pr-auto-review.yml workflow (compliance automation Phase 2)
don-petry Jun 1, 2026
4a8ab9c
fix(bot): address bot feedback [skip ci-relay]
donpetry-bot Jun 1, 2026
268c1e2
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
6f93db4
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
0abb7ff
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
531efc6
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
c68c454
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
f777fe8
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
fdb857e
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
4490eaf
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
a0408a3
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
2874ee4
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
20b5236
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
9a72646
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
dd9e4d9
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
669b546
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
2dba942
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
e1a5d1e
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
e9c92fc
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
1914457
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
f86e1bf
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 1, 2026
d24063c
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
59 changes: 59 additions & 0 deletions .github/workflows/pr-auto-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ─────────────────────────────────────────────────────────────────────────────
# 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.
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:
Comment thread
don-petry marked this conversation as resolved.
Resolved
workflows: ["CI", "SonarCloud Analysis", "Dev-Lead Agent"]
Comment thread
don-petry marked this conversation as resolved.
Resolved
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]
Comment thread
don-petry marked this conversation as resolved.
Resolved
# Re-evaluate when the PR is first opened, updated, or comes out of draft.
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
Comment thread
don-petry marked this conversation as resolved.
Resolved

permissions: {}

jobs:
pr-auto-review:
# Skip pull_request / pull_request_review events from forks and Dependabot:
# secrets are unavailable in those contexts, so the reusable's GH_PAT_WORKFLOWS
# call would fail. The later workflow_run path runs with secrets after CI finishes.
if: >
github.event_name != 'pull_request' && github.event_name != 'pull_request_review' ||
(github.event.pull_request.head.repo.full_name == github.repository &&
github.actor != 'dependabot[bot]')

Check failure on line 52 in .github/workflows/pr-auto-review.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Workflows should not rely on forgeable GitHub context values to trust events

See more on https://sonarcloud.io/project/issues?id=petry-projects_markets&issues=AZ6BWoRUEMqJBb_RP3M8&open=AZ6BWoRUEMqJBb_RP3M8&pullRequest=245
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
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 }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ build/
Thumbs.db
.dev-lead/
.dev-lead/
.dev-lead/
.dev-lead/
Loading