Repository navigation
Conversation
| - `grouping_strategy` must be `ALLGREEN` (all queued PRs in a group must pass checks) or `HEADGREEN` (only the head | ||
| commit of the group must pass checks). | ||
| - `merge_method` must be `MERGE`, `SQUASH`, or `REBASE`. | ||
| - `merge_queue` combines with the other convenience keys in the same ruleset entry, as in the example above. |
There was a problem hiding this comment.
Nit: these values might be more useful as comments in the example configuration (like in “Merge buttons” then as notes. This way the documentation travels with the example.
|
Tried to sandbox-test this and could not, but the reason isn't your change. Rebased onto current I then posted the same rule directly to the REST API with a hand-written payload, bypassing the parser entirely, and got byte-identical output — while a plain Run: https://github.com/potiuk/infrastructure-asfyaml/actions/runs/35316854577 This needs a run against |
|
@potiuk any idea who's qualified to run that? Pretty sure I can't do it :/ |
One of the infra people :) |
|
Thanks @potiuk. @Humbedooh any chance you could kick off a sandbox run on this one? Merge queue isn't available on user-owned repos, so the fork self-test path can't cover it. |
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. ### TESTING INSTRUCTIONS - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
As described in https://github.com/apache/infrastructure-asfyaml/blob/main/docs/testing-a-change.md#testing-locally-instead - you need an organisation admin and the organisation has to have ability to use that feature. You could likely @rusackas test it yourself - and provide evidences (as I did) - all you need you need an organisation in GitHub that you can test it with -> Preset I guess? The documentation is pretty comprehensive - and basically all I did when I tested other changes was to ask my agent to "test this PR" the SKILL that I created should handle all the rest, including producing test report and linking to your runs showing how it works. |
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. ### TESTING INSTRUCTIONS - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Ahh, didn't realize a Preset org would work for this. Not sure I've got owner rights there though. And I hadn't spotted the |
|
SKILLs are all you need ;) |
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GitHub's merge queue rule type already worked through the raw ruleset payload path (the numeric-parameter allowlist already listed all five of its integer fields), but it wasn't documented anywhere and couldn't be combined with the convenience-syntax keys in the same ruleset entry, since raw and convenience syntax can't mix. A project wanting merge queue plus e.g. required_pull_request_reviews had to hand-write the entire ruleset as a raw payload. Adds a `merge_queue` convenience key alongside the existing required_status_checks/required_pull_request_reviews keys, so it composes with the rest of the convenience syntax. All seven fields are required by GitHub's Rulesets API, so validation requires all of them rather than guessing at defaults GitHub doesn't document. Documents both the new convenience key and the (already-working) raw payload rule type in the Rulesets section of the README.
ad14f73 to
922b0de
Compare
|
Sandbox-tested at Ran against github:
rulesets:
- name: "Merge Queue"
type: branch
required_pull_request_reviews:
required_approving_review_count: 1
merge_queue:
check_response_timeout_minutes: 60
grouping_strategy: ALLGREEN
max_entries_to_build: 5
max_entries_to_merge: 5
merge_method: SQUASH
min_entries_to_merge: 1
min_entries_to_merge_wait_minutes: 5Confirmed by reading Reset afterward: deleted the ruleset via the API (its own protection blocked the usual "push baseline, re-run" reset until it was gone), then re-ran against the baseline Dry run: https://github.com/rusackas/infrastructure-asfyaml/actions/runs/36967718339 |
|
@potiuk sandbox test's done, details in the comment above. Had to use an apache-superset sandbox since merge queue needs an org-owned repo, exactly as you suspected. CI's green and it's already approved, so should be mergeable whenever you get a chance. |
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
cool. @Humbedooh -> there are a number of other PRs here as well, is there a way to get those reviews / merges done somewhat faster ? Generally speaking we now have tools that allow to test things in minutes (literally), so all we really need is somoene who has write access to decide if given feature should or should not be merged - and you can test it via your agent with:
So I think all major blockers from Can we do something to speed things up here and empower more PMCs to do more things with their actions? I am not asking for "more work for you" - I am asking for ways to unblock obstacles - and I am oferring my help. |
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a `github.rulesets` entry to .asf.yaml turning on GitHub's merge queue for master, alongside the existing classic `protected_branches` config (the two mechanisms coexist; classic protection still gates PR-entry-into-queue readiness, the new ruleset adds the merge_queue rule and its own required_status_checks that must pass against the queue's synthetic merge-group ref before a batch actually merges). Wires `merge_group:` support into every workflow that produces one of those required checks, since GitHub does not run a workflow against a merge-group ref unless it explicitly listens for that event -- without this, every queued PR would time out waiting for statuses that never get reported: - enforce-single-migration-head.yml: the file-list-based skip optimization can't work for merge_group (no pull_request context to list files from), so it now always runs the real check there, matching the file's own existing fail-closed philosophy -- this is also exactly the scenario the check exists for (two migration heads that each looked fine alone, combined by the queue). - pre-commit.yml: the changed-files diff base for merge_group is read from the event's own explicit `merge_group.base_sha` rather than assuming its commit has the same two-parent shape pull_request's synthetic merge commit does. - scripts/change_detector.py (used by superset-frontend.yml, superset-e2e.yml, and all three python test workflows): the change detector's event-type dispatch previously raised on anything but pull_request/push/workflow_dispatch/schedule; added a merge_group branch that diffs against `merge_group.base_sha` via a new shared `fetch_changed_files_compare()` helper (also now used by the existing push path, no behavior change there). Two required checks are deliberately left without merge_group support and excluded from the new ruleset's required_status_checks, staying required only via the existing classic config (i.e. still gate a PR before a committer can add it to the queue, just don't re-run once it's in one): - lint-check: validates the PR's own title, which doesn't mean anything once re-run against a merge-group ref. - dependency-review: actions/dependency-review-action has a confirmed, currently-unfixed bug on merge_group events (destructures github.event.pull_request, which doesn't exist there, and crashes -- see actions/dependency-review-action#843). Uses the raw ruleset payload syntax rather than the nicer `merge_queue` convenience key, since that key is still pending upstream in apache/infrastructure-asfyaml#119 (not yet merged/deployed as of this writing) -- .asf.yaml can move to the convenience syntax once that lands. - `pytest tests/unit_tests/scripts/change_detector_test.py` -- 13 passed (8 existing + 5 new: compare-helper delegation, push still delegates to it, merge_group happy path, merge_group fails closed without MERGE_GROUP_BASE_SHA). - `ruff check` / `ruff format --check` on the two touched Python files -- clean. - `zizmor` (the same GHA security linter this repo's `validate-all-ghas` check runs) against every touched workflow/action file -- no findings. - `python3 -c "import yaml; yaml.safe_load(...)"` on .asf.yaml and every touched workflow file -- all parse. - Parsed .asf.yaml back with PyYAML to confirm `rulesets` landed as a sibling of `protected_branches`, not nested inside it, and printed the parsed ruleset structure to confirm the exact shape GitHub's Rulesets API expects. - Could not run pre-commit itself end-to-end -- its git-diffing is broken in this environment on an unrelated host xcrun/libxcrun architecture mismatch (not something this commit introduces); the checks above cover what pre-commit would have run for these file types (ruff, YAML validity, zizmor). - Not yet verified against a live merge-group run (only checkable once this actually merges and a real queue entry exercises it). - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
GitHub's merge queue rule type already worked through the existing raw ruleset payload path (
github.rulesets[].rules[].type: merge_queue) since the top-level schema forrulesetsis fully generic and the numeric-parameter coercion list already happened to include all five ofmerge_queue's integer fields. But it wasn't documented anywhere, and it couldn't be combined with any of the convenience-syntax keys (required_pull_request_reviews,branches, etc.) in the same ruleset entry, since raw and convenience syntax are mutually exclusive per entry. A project wanting a merge queue alongside e.g. required reviews had to hand-write the entire ruleset as a raw API payload, translatingbranches.includesintoconditions.ref_name, etc.This PR:
merge_queueconvenience key, so it composes with the rest of the convenience syntax (see example below).All seven
merge_queueparameters are required by GitHub's Rulesets API, so the convenience syntax requires all of them too rather than guessing at undocumented defaults.Example
Testing instructions
pytest tests/github_rulesets.py(new tests:test_rulesets_convenience_merge_queue_*,test_rulesets_raw_merge_queue_rule_passes_through)ruff check/ruff format --check/mypyall pass on the changed filesmerge_queueruleset round-trips to the exact shape GitHub's Rulesets API expectsNo behavior changes to any existing rule types.