-
-
Notifications
You must be signed in to change notification settings - Fork 133
Add branch protection ruleset as code #1992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 1043
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 1148
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 1273
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 4057
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 395
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 404
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 1474
🏁 Script executed:
Repository: grumpycoders/pcsx-redux
Length of output: 2126
Critical: Status check names won't match GitHub Actions reporting.
The status check context names for GitHub Actions jobs (integration_id 15368) don't match how GitHub actually reports them. When a workflow job has no explicit
name:field, GitHub reports the check as"workflow-name / job-id", not just"job-id".Based on the workflow configurations:
"build-openbios"should be"macOS CI / build-openbios""build"should be"Linux CI / build""coverage"should be"Linux CI coverage / coverage""cross-arm64"should be"Linux CI cross / cross-arm64""asan"should be"Linux CI asan / asan""toolchain"should be"Linux CI toolchain / toolchain"Without correction, these required checks will never pass and PRs will be permanently blocked from merging.
🔧 Proposed fix
{ - "context": "build-openbios", + "context": "macOS CI / build-openbios", "integration_id": 15368 }, { - "context": "build", + "context": "Linux CI / build", "integration_id": 15368 }, { - "context": "coverage", + "context": "Linux CI coverage / coverage", "integration_id": 15368 }, { - "context": "cross-arm64", + "context": "Linux CI cross / cross-arm64", "integration_id": 15368 }, { - "context": "asan", + "context": "Linux CI asan / asan", "integration_id": 15368 }, { - "context": "toolchain", + "context": "Linux CI toolchain / toolchain", "integration_id": 15368 }🤖 Prompt for AI Agents