From 33e7fe8c0374e75b3c7e3f04aedefe9a6dd4f3da Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Mon, 23 Mar 2026 19:15:31 -0700 Subject: [PATCH] Add branch protection ruleset as code Store the main branch required status checks and protection rules in a JSON file that can be imported via the GitHub API, replacing manual UI configuration. Drops the stale macos-intel-build-and-test check. Signed-off-by: Nicolas 'Pixel' Noble --- .github/rulesets/main.json | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/rulesets/main.json diff --git a/.github/rulesets/main.json b/.github/rulesets/main.json new file mode 100644 index 000000000..8ad311603 --- /dev/null +++ b/.github/rulesets/main.json @@ -0,0 +1,74 @@ +{ + "name": "main branch protection", + "target": "branch", + "enforcement": "active", + "conditions": { + "ref_name": { + "include": ["~DEFAULT_BRANCH"], + "exclude": [] + } + }, + "rules": [ + { + "type": "deletion" + }, + { + "type": "non_fast_forward" + }, + { + "type": "pull_request", + "parameters": { + "required_approving_review_count": 1, + "dismiss_stale_reviews_on_push": true, + "require_code_owner_review": false, + "require_last_push_approval": false, + "required_review_thread_resolution": false + } + }, + { + "type": "required_status_checks", + "parameters": { + "required_status_checks": [ + { + "context": "pcsx-redux Windows build", + "integration_id": 9426 + }, + { + "context": "pcsx-redux Bios build", + "integration_id": 9426 + }, + { + "context": "pcsx-redux Windows CLI build", + "integration_id": 9426 + }, + { + "context": "build-openbios", + "integration_id": 15368 + }, + { + "context": "build", + "integration_id": 15368 + }, + { + "context": "coverage", + "integration_id": 15368 + }, + { + "context": "cross-arm64", + "integration_id": 15368 + }, + { + "context": "asan", + "integration_id": 15368 + }, + { + "context": "toolchain", + "integration_id": 15368 + } + ], + "strict_required_status_checks_policy": false, + "do_not_enforce_on_create": false + } + } + ] +}