ci(Mergify): add outdated PR protection#75
Conversation
|
No actionable comments were generated in the recent review. 🎉 Summary by CodeRabbit
WalkthroughAdds a new Mergify configuration with two merge-protection rules (complex CI success conditions and a "no stale PRs" guard limiting commits-behind to 10) and removes the composite CI status check from the centralized GitHub Actions workflow; individual CI jobs remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub (PR)
participant Actions as GitHub Actions
participant Mergify as Mergify
participant Repo as Repository (main)
rect rgba(100,149,237,0.5)
Dev->>GH: Open PR / push commits
GH->>Actions: Trigger CI jobs (quality, test, test-cross-platform, coverage)
Actions->>GH: Report individual job statuses
end
rect rgba(60,179,113,0.5)
Note right of GH: Old flow (removed)
GH->>GH: Aggregate `ci-pass` composite status (was)
GH->>Repo: Block merge if composite failed (was)
end
rect rgba(255,165,0,0.5)
Note right of Mergify: New flow
GH->>Mergify: PR opened / status updates
Mergify->>GH: Evaluate complex success_conditions across statuses
Mergify->>GH: Check `#commits-behind <= 10`
Mergify-->>GH: Approve merge if conditions satisfied
GH->>Repo: Merge PR (when Mergify allows)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 📃 Configuration Change RequirementsWonderful, this rule succeeded.Mergify configuration change
|
🧪 CI InsightsHere's what we observed from your CI run for 27e2ec7. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Pull request overview
This PR adds a Mergify configuration to establish merge protections for the repository. Mergify is a GitHub automation tool that can enforce merge policies beyond what GitHub's branch protection rules provide. The configuration prevents merging pull requests that have fallen too far behind the main branch.
Changes:
- Adds
.mergify.ymlconfiguration file with a single merge protection rule
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
c88196f to
bec87ba
Compare
Remove the ci-pass aggregate job from CI workflow. Mergify now handles the merge gate via merge_protections that check each CI job individually, properly handling the skipped-vs-running name differences for matrix jobs (test-cross-platform). Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Address Copilot review: replace vague "almost up to date" with the specific "within 10 commits of the base branch". Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:152
- Removing the
ci-pass/CIaggregation job changes the branch-protection surface area: PRs that only touch non-Rust files will now havequality/test/coverage/test-cross-platformskipped with no single always-running status check to satisfy a required-check rule. If branch protection still requires theCIcheck (as the deleted comment indicates), merges will be blocked; either keep an always-running aggregator job (and make it the required check) or update the repo’s required status checks accordingly.
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: lcov.info
## 🤖 New release
* `libmagic-rs`: 0.1.1 -> 0.2.0 (⚠ API breaking changes)
### ⚠ `libmagic-rs` breaking changes
```text
--- failure enum_unit_variant_changed_kind: An enum unit variant changed kind ---
Description:
A public enum's exhaustive unit variant has changed to a different kind of enum variant, breaking possible instantiations and patterns.
ref: https://doc.rust-lang.org/reference/items/enumerations.html
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/enum_unit_variant_changed_kind.ron
Failed in:
variant TypeKind::Byte in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:84
variant TypeKind::Byte in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:84
variant TypeKind::Byte in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:84
--- failure enum_variant_added: enum variant added on exhaustive enum ---
Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/enum_variant_added.ron
Failed in:
variant Operator:LessThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:144
variant Operator:GreaterThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:155
variant Operator:LessEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:166
variant Operator:GreaterEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:177
variant Operator:LessThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:144
variant Operator:GreaterThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:155
variant Operator:LessEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:166
variant Operator:GreaterEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:177
variant Operator:LessThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:144
variant Operator:GreaterThan in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:155
variant Operator:LessEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:166
variant Operator:GreaterEqual in /tmp/.tmpchbzmC/libmagic-rs/src/parser/ast.rs:177
--- failure function_parameter_count_changed: pub fn parameter count changed ---
Description:
A publicly-visible function now takes a different number of parameters.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/function_parameter_count_changed.ron
Failed in:
libmagic_rs::evaluator::types::read_byte now takes 3 parameters instead of 2, in /tmp/.tmpchbzmC/libmagic-rs/src/evaluator/types.rs:79
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
## [0.2.0] - 2026-03-01
### Features
- **parser**: Implement comparison operators
([#104](#104))
### Miscellaneous Tasks
- **Mergify**: Add outdated PR protection
([#75](#75))
- Add Mergify merge queue and simplify CI
([#78](#78))
- Mergify merge queue, dependabot integration, and CI simplification
([#79](#79))
- **release**: Add regex for version bumping based on commit types
<!-- generated by git-cliff -->
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This change has been made by @unclesp1d3r from the Mergify merge protections editor.