Skip to content

fix(ci): queue approved pull requests on master - #166

Closed
systemfsoftware-maker wants to merge 1 commit into
masterfrom
ci/queue-when-approved-master
Closed

systemfsoftware-maker wants to merge 1 commit into
masterfrom
ci/queue-when-approved-master

Conversation

@systemfsoftware-maker

Copy link
Copy Markdown
Collaborator

Summary

An approved pull request in this repository now enters the merge queue without a @Mergifyio queue comment. The org rule that does this, "Queue when approved" in systemfsoftware/.github, matches base = main. This repo's default branch is master, so it never fired.

What changed

.mergify.yml gains a rule named "Queue when approved" whose conditions are the org rule's, verbatim, except base = master. Mergify keeps the local rule when both files define one with the same name (see "Extending configuration files" in https://docs.mergify.com/configuration/sharing/), so it replaces the org rule here and the rest of the org policy still applies. I parsed the org file and this one with anchors resolved: the two rules are identical apart from the base condition.

shared is not inherited, so the two anchors the rule uses (kiro_gate, not_queue_branch) are copied locally with the org file's current values. The branch is not renamed and the org file is not touched.

Order with #165

Merge #165 first. Until it lands, actionlint + version surfaces is not reported, so a queued PR still waits on that condition.

Unapplied review findings

  • P2 — .mergify.yml:5 — The org file has a phase switch for kiro_gate (approval by kiro-systemf[bot] now, check-success = @kiro-systemf/review-gate later). When it flips, this repo's copy stays on phase 1 and the two drift silently. Only the comment at that line guards it. A CI step that compares the anchors with the live org file would catch it, but adds a gate, which needs operator sign-off.
  • P2 — .mergify.yml:13 — Same ordering point as above: queue_conditions names actionlint + version surfaces, which exists only once fix(ci): restore the version and mode checks #155 dropped #165 merges.

Residual risk, inferred and not tested: Mergify reads pull_request_rules from the base branch, so approving this PR will not queue it. It needs one manual @Mergifyio queue.

Testing

  • Both YAML files parsed with anchors resolved; the rule comparison above ran from code, not by eye.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test --all-targets pass locally. Mutation was not run: no classifier change.
  • Pending: Mergify's Configuration changed check on this head, which validates the new config against the app. Nothing local runs it.
  • Code review: focused path with one local adversarial reviewer (run 20261111-015121-2650e7a1, artifact adversarial-mergify.json, no P0 or P1).

Compound Engineering

The org rule "Queue when approved" in systemfsoftware/.github matches
base = main. This repository's default branch is master, so an approval
never queued a PR; it needed a manual @Mergifyio queue comment.

Add a rule of the same name with the org rule's conditions, base = master
in place of base = main. Mergify keeps the local rule when both files name
one, so the rest of the org policy still applies. `shared` anchors are not
inherited, so the two the rule uses are copied locally.
@systemfsoftware-maker

Copy link
Copy Markdown
Collaborator Author

Closing: a copied rule drifts from the org file (the kiro_gate phase switch would leave this copy behind). The mismatch is fixed at the source in systemfsoftware/.github instead, so every repository whose default branch is not main is covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant