Skip to content

ci(Mergify): add outdated PR protection#75

Merged
unclesp1d3r merged 3 commits into
mainfrom
mergify/unclesp1d3r/I193758485da3f1c2dca761f40258f37fb8115310
Feb 15, 2026
Merged

ci(Mergify): add outdated PR protection#75
unclesp1d3r merged 3 commits into
mainfrom
mergify/unclesp1d3r/I193758485da3f1c2dca761f40258f37fb8115310

Conversation

@unclesp1d3r
Copy link
Copy Markdown
Member

This change has been made by @unclesp1d3r from the Mergify merge protections editor.

Copilot AI review requested due to automatic review settings February 15, 2026 22:16
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 15, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 15, 2026

No actionable comments were generated in the recent review. 🎉


Summary by CodeRabbit

  • Chores
    • Enhanced merge protection to enforce CI status checks before merging, ensuring code quality and test requirements are met
    • Added safeguard to prevent merging pull requests that are significantly outdated relative to the target branch

Walkthrough

Adds 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

Cohort / File(s) Summary
Mergify configuration
/.mergify.yml
Adds merge_protections: a "CI must pass" rule with nested success_conditions covering multiple CI job names (including handling skipped checks) and a "Do not merge outdated PRs" rule enforcing #commits-behind <= 10 on main.
CI workflow update
.github/workflows/ci.yml
Removes the composite ci-pass status-check job that aggregated quality, test, test-cross-platform, and coverage; individual CI jobs remain but no single aggregated gate exists.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through CI and config cheer,
Rules set tidy, the path is clear.
Ten commits back — no stale surprise,
Checks combined by clever eyes.
A carrot for merges, bright and dear. 🥕

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding outdated PR protection via Mergify configuration.
Description check ✅ Passed The description is related to the changeset as it identifies the tool (Mergify merge protections editor) used to make the changes, though minimal detail is provided.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mergify/unclesp1d3r/I193758485da3f1c2dca761f40258f37fb8115310

Comment @coderabbitai help to get the list of available commands and usage tips.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 15, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 📃 Configuration Change Requirements

Wonderful, this rule succeeded.

Mergify configuration change

  • check-success = Configuration changed

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 15, 2026

🧪 CI Insights

Here's what we observed from your CI run for 27e2ec7.

🟢 All jobs passed!

But CI Insights is watching 👀

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml configuration file with a single merge protection rule

Comment thread .mergify.yml Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 15, 2026
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
@unclesp1d3r unclesp1d3r force-pushed the mergify/unclesp1d3r/I193758485da3f1c2dca761f40258f37fb8115310 branch from c88196f to bec87ba Compare February 15, 2026 22:21
@unclesp1d3r unclesp1d3r changed the title ci(Mergify): configuration update ci(Mergify): add outdated PR protection Feb 15, 2026
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>
Copilot AI review requested due to automatic review settings February 15, 2026 22:22
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 15, 2026
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/CI aggregation job changes the branch-protection surface area: PRs that only touch non-Rust files will now have quality/test/coverage/test-cross-platform skipped with no single always-running status check to satisfy a required-check rule. If branch protection still requires the CI check (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

@unclesp1d3r unclesp1d3r merged commit 5aa276d into main Feb 15, 2026
23 checks passed
@unclesp1d3r unclesp1d3r deleted the mergify/unclesp1d3r/I193758485da3f1c2dca761f40258f37fb8115310 branch February 15, 2026 22:27
@github-actions github-actions Bot mentioned this pull request Feb 15, 2026
@github-actions github-actions Bot mentioned this pull request Feb 15, 2026
@github-actions github-actions Bot mentioned this pull request Feb 16, 2026
@github-actions github-actions Bot mentioned this pull request Feb 23, 2026
@github-actions github-actions Bot mentioned this pull request Mar 1, 2026
mergify Bot pushed a commit that referenced this pull request Mar 1, 2026
## 🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants