You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/markets to converge.
Codify the pr-quality repository ruleset (including require_last_push_approval: true) as a repo-local, idempotent fallback script — mirroring the existing apply-code-quality-ruleset.sh pattern — so the drifted parameter can be re-converged from within this repo.
Root Cause
This repo maintains repo-local fallback scripts for applying GitHub rulesets (apply-code-quality-ruleset.sh, apply-repo-settings.sh). There is no equivalent for the pr-quality ruleset, so nothing in-repo re-applies require_last_push_approval: true, allowing it to drift to false. The canonical source of truth remains the org standards/rulesets/pr-quality.json; this script is a repo-local reference/fallback matching that JSON exactly.
Implementation Checklist
Create .github/scripts/apply-pr-quality-ruleset.sh — idempotent create/update of the pr-quality ruleset with parameters matching the canonical org JSON: required_approving_review_count: 1, require_code_owner_review: true, required_review_thread_resolution: true, dismiss_stale_reviews_on_push: true, require_last_push_approval: true, allowed_merge_methods: ["squash"], plus bypass actors (OrganizationAdmin + dependabot-automerge Integration id 3167543)
Ensure script is executable and passes shellcheck (set -euo pipefail, targets petry-projects/markets)
Tests to Write
.github/scripts/tests/apply-pr-quality-ruleset.bats — static-content assertions: script exists & executable, ruleset name is pr-quality, require_last_push_approval is true, other pr-quality params present, set -euo pipefail, targets petry-projects/markets
Test Command
bats .github/scripts/tests/apply-pr-quality-ruleset.bats (plus bash .dev-lead/scripts/dev-lead-lint.sh and shellcheck)
$ bats .github/scripts/tests/apply-pr-quality-ruleset.bats
1..10
ok 1 script exists and is executable
ok 2 script uses set -euo pipefail
ok 3 script targets petry-projects/markets repo
ok 4 script manages the pr-quality ruleset
ok 5 script codifies require_last_push_approval as true (issue #325)
ok 6 script sets the full pr-quality pull_request parameters
ok 7 script uses the pull_request rule type
ok 8 script requires GH_TOKEN
ok 9 script is idempotent (checks for existing ruleset id)
ok 10 script generates valid JSON payload that matches the canonical pr-quality ruleset
$ shellcheck --severity=warning -x .github/scripts/apply-pr-quality-ruleset.sh # PASS
$ bash .dev-lead/scripts/dev-lead-lint.sh # all checks passed
Files Changed
.github/scripts/apply-pr-quality-ruleset.sh (new): idempotent script that creates/updates the pr-quality ruleset with the compliant require_last_push_approval: true and the full canonical parameter set (required_approving_review_count: 1, require_code_owner_review: true, required_review_thread_resolution: true, dismiss_stale_reviews_on_push: true, allowed_merge_methods: ["squash"]) plus bypass actors (OrganizationAdmin + dependabot-automerge Integration id 3167543). Run with GH_TOKEN=<admin-token> bash .github/scripts/apply-pr-quality-ruleset.sh to converge.
.github/scripts/tests/apply-pr-quality-ruleset.bats (new): static-content + payload assertions guarding the compliance parameter.
Notes
The canonical source of truth remains the org standards/rulesets/pr-quality.json; this repo-local script is a reference/fallback mirroring the existing apply-code-quality-ruleset.sh pattern. Applying the ruleset to the live GitHub repo requires an admin token and is out of scope for this file-only change.
Two failures in the unrelated pr-review-mention-workflow.bats (tests for pr-review-mention.yml, not touched here) are pre-existing yq-flavor/environment mismatches, independent of this change (only two new files were added).
Codify the pr-quality repository ruleset as a repo-local, idempotent reference/fallback script (mirroring the existing apply-code-quality-ruleset.sh pattern) so require_last_push_approval is set to true per the codified standard (petry-projects/.github/standards/rulesets/pr-quality.json, source of truth #575/#580).
Root Cause
The pr-quality ruleset is managed by the org-level canonical tool; this repo has no repo-local reference script for it. The drift finding (require_last_push_approval expected true, actual false) is remediated by codifying the full ruleset locally with the correct parameter, matching the established code-quality pattern.
Implementation Checklist
.github/scripts/apply-pr-quality-ruleset.sh — new idempotent create/update script for the pr-quality ruleset (pull_request rule) with require_last_push_approval: true and all other codified parameters/bypass actors from the canonical JSON
.github/scripts/tests/apply-pr-quality-ruleset.bats — static content assertions (no live API calls)
Tests to Write
script exists and is executable
uses set -euo pipefail
targets petry-projects/markets
declares the pr-quality ruleset
sets require_last_push_approval: true (the drifted parameter)
Added .github/scripts/apply-pr-quality-ruleset.sh — idempotent create/update of the pr-quality ruleset with require_last_push_approval: true
Added .github/scripts/tests/apply-pr-quality-ruleset.bats — static content assertions (no live API calls)
Verified full bats suite, shellcheck, and dev-lead-lint all pass
Root Cause & Fix
The pr-quality ruleset is managed by the org-level canonical tool (petry-projects/.github/scripts/apply-rulesets.sh); this repo previously had no repo-local reference script for it (unlike code-quality). The drift (require_last_push_approval expected true, actual false) is remediated by codifying the full pr-quality ruleset locally — mirroring the existing apply-code-quality-ruleset.sh pattern (#326) — with all parameters from the source-of-truth JSON (standards/rulesets/pr-quality.json, #575/#580), including require_last_push_approval: true. Running the script with an admin GH_TOKEN converges the live ruleset.
Test Results
1..11
ok 1 script exists and is executable
ok 2 script uses set -euo pipefail
ok 3 script targets petry-projects/markets repo
ok 4 script declares the pr-quality ruleset
ok 5 script declares a pull_request rule
ok 6 script sets require_last_push_approval to true (issue #325)
ok 7 script requires 1 approving review
ok 8 script requires code owner review
ok 9 script requires review thread resolution
ok 10 script dismisses stale reviews on push
ok 11 script restricts allowed merge methods to squash
.github/scripts/apply-pr-quality-ruleset.sh: new idempotent reference/fallback script codifying the pr-quality ruleset (pull_request rule) with require_last_push_approval: true, required_approving_review_count: 1, require_code_owner_review, required_review_thread_resolution, dismiss_stale_reviews_on_push, allowed_merge_methods: ["squash"], and the canonical bypass actors (OrganizationAdmin + Integration 3167543)
.github/scripts/tests/apply-pr-quality-ruleset.bats: 11 static assertions covering the drifted parameter and all other codified params
Notes
Followed the established repo-local pattern (apply-code-quality-ruleset.sh): no workflow wiring added, as the sibling ruleset script is likewise a standalone reference/fallback and the org-level tool remains canonical.
Tests are static-content assertions (no live GitHub API calls), consistent with the existing ruleset test convention.
Applying to the live repo requires an admin GH_TOKEN (administration:write) and is out of scope for this code change.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/markets to converge.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/markets to converge.
Activity
don-petry commentedon Jul 17, 2026
Dev-Lead Implementation Plan
Issue: #325 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
Codify the
pr-qualityrepository ruleset (includingrequire_last_push_approval: true) as a repo-local, idempotent fallback script — mirroring the existingapply-code-quality-ruleset.shpattern — so the drifted parameter can be re-converged from within this repo.Root Cause
This repo maintains repo-local fallback scripts for applying GitHub rulesets (
apply-code-quality-ruleset.sh,apply-repo-settings.sh). There is no equivalent for thepr-qualityruleset, so nothing in-repo re-appliesrequire_last_push_approval: true, allowing it to drift tofalse. The canonical source of truth remains the orgstandards/rulesets/pr-quality.json; this script is a repo-local reference/fallback matching that JSON exactly.Implementation Checklist
.github/scripts/apply-pr-quality-ruleset.sh— idempotent create/update of thepr-qualityruleset with parameters matching the canonical org JSON:required_approving_review_count: 1,require_code_owner_review: true,required_review_thread_resolution: true,dismiss_stale_reviews_on_push: true,require_last_push_approval: true,allowed_merge_methods: ["squash"], plus bypass actors (OrganizationAdmin + dependabot-automerge Integration id 3167543)set -euo pipefail, targetspetry-projects/markets)Tests to Write
.github/scripts/tests/apply-pr-quality-ruleset.bats— static-content assertions: script exists & executable, ruleset name ispr-quality,require_last_push_approvalistrue, other pr-quality params present,set -euo pipefail, targetspetry-projects/marketsTest Command
bats .github/scripts/tests/apply-pr-quality-ruleset.bats(plusbash .dev-lead/scripts/dev-lead-lint.shandshellcheck)don-petry commentedon Jul 17, 2026
Dev-Lead: Implementation Complete
Plan Execution
apply-code-quality-ruleset.sh,apply-repo-settings.sh) but had nopr-qualityequivalent, so nothing in-repo re-appliedrequire_last_push_approval: true, allowing drift tofalse..github/scripts/apply-pr-quality-ruleset.sh— idempotent create/update of thepr-qualityruleset, payload matching the canonical orgstandards/rulesets/pr-quality.jsonverbatim (incl.require_last_push_approval: true)..github/scripts/tests/apply-pr-quality-ruleset.bats(TDD: written first, confirmed red, then green).Test Results
Files Changed
.github/scripts/apply-pr-quality-ruleset.sh(new): idempotent script that creates/updates thepr-qualityruleset with the compliantrequire_last_push_approval: trueand the full canonical parameter set (required_approving_review_count: 1,require_code_owner_review: true,required_review_thread_resolution: true,dismiss_stale_reviews_on_push: true,allowed_merge_methods: ["squash"]) plus bypass actors (OrganizationAdmin + dependabot-automerge Integration id 3167543). Run withGH_TOKEN=<admin-token> bash .github/scripts/apply-pr-quality-ruleset.shto converge..github/scripts/tests/apply-pr-quality-ruleset.bats(new): static-content + payload assertions guarding the compliance parameter.Notes
standards/rulesets/pr-quality.json; this repo-local script is a reference/fallback mirroring the existingapply-code-quality-ruleset.shpattern. Applying the ruleset to the live GitHub repo requires an admin token and is out of scope for this file-only change.pr-review-mention-workflow.bats(tests forpr-review-mention.yml, not touched here) are pre-existingyq-flavor/environment mismatches, independent of this change (only two new files were added).don-petry commentedon Jul 21, 2026
Dev-Lead Implementation Plan
Issue: #325 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
Codify the
pr-qualityrepository ruleset as a repo-local, idempotent reference/fallback script (mirroring the existingapply-code-quality-ruleset.shpattern) sorequire_last_push_approvalis set totrueper the codified standard (petry-projects/.github/standards/rulesets/pr-quality.json, source of truth #575/#580).Root Cause
The
pr-qualityruleset is managed by the org-level canonical tool; this repo has no repo-local reference script for it. The drift finding (require_last_push_approvalexpectedtrue, actualfalse) is remediated by codifying the full ruleset locally with the correct parameter, matching the establishedcode-qualitypattern.Implementation Checklist
.github/scripts/apply-pr-quality-ruleset.sh— new idempotent create/update script for thepr-qualityruleset (pull_requestrule) withrequire_last_push_approval: trueand all other codified parameters/bypass actors from the canonical JSON.github/scripts/tests/apply-pr-quality-ruleset.bats— static content assertions (no live API calls)Tests to Write
set -euo pipefailpetry-projects/marketspr-qualityrulesetrequire_last_push_approval: true(the drifted parameter)required_approving_review_count: 1,require_code_owner_review,required_review_thread_resolution,dismiss_stale_reviews_on_push,allowed_merge_methods: ["squash"]Test Command
bats .github/scripts/tests/(plusshellcheckand.dev-lead/scripts/dev-lead-lint.sh)don-petry commentedon Jul 21, 2026
Dev-Lead: Implementation Complete
Plan Execution
.github/scripts/apply-pr-quality-ruleset.sh— idempotent create/update of thepr-qualityruleset withrequire_last_push_approval: true.github/scripts/tests/apply-pr-quality-ruleset.bats— static content assertions (no live API calls)Root Cause & Fix
The
pr-qualityruleset is managed by the org-level canonical tool (petry-projects/.github/scripts/apply-rulesets.sh); this repo previously had no repo-local reference script for it (unlikecode-quality). The drift (require_last_push_approvalexpectedtrue, actualfalse) is remediated by codifying the fullpr-qualityruleset locally — mirroring the existingapply-code-quality-ruleset.shpattern (#326) — with all parameters from the source-of-truth JSON (standards/rulesets/pr-quality.json, #575/#580), includingrequire_last_push_approval: true. Running the script with an adminGH_TOKENconverges the live ruleset.Test Results
ShellCheck (
--severity=warning -x): clean (0 warnings)Files Changed
.github/scripts/apply-pr-quality-ruleset.sh: new idempotent reference/fallback script codifying thepr-qualityruleset (pull_requestrule) withrequire_last_push_approval: true,required_approving_review_count: 1,require_code_owner_review,required_review_thread_resolution,dismiss_stale_reviews_on_push,allowed_merge_methods: ["squash"], and the canonical bypass actors (OrganizationAdmin + Integration 3167543).github/scripts/tests/apply-pr-quality-ruleset.bats: 11 static assertions covering the drifted parameter and all other codified paramsNotes
apply-code-quality-ruleset.sh): no workflow wiring added, as the sibling ruleset script is likewise a standalone reference/fallback and the org-level tool remains canonical.GH_TOKEN(administration:write) and is out of scope for this code change.don-petry commentedon Jul 24, 2026
Weekly Compliance Audit (2026-07-24)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/marketsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Jul 31, 2026
Weekly Compliance Audit (2026-07-31)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/marketsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
feat: implement issue #325 — Compliance: ruleset-drift-pr-quality-req…
feat: implement issue #325 — Compliance: ruleset-drift-pr-quality-req…
feat: implement issue #325 — Compliance: ruleset-drift-pr-quality-req…
feat: implement issue #400 — Compliance: ruleset-bypass-dependabot-co…