Skip to content

ci(Mergify): configuration update#123

Closed
unclesp1d3r wants to merge 1 commit into
mainfrom
mergify/unclesp1d3r/I3d8ff2eda3d5d8634447a087314ebc47ec91a62c
Closed

ci(Mergify): configuration update#123
unclesp1d3r wants to merge 1 commit into
mainfrom
mergify/unclesp1d3r/I3d8ff2eda3d5d8634447a087314ebc47ec91a62c

Conversation

@unclesp1d3r
Copy link
Copy Markdown
Member

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

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Copilot AI review requested due to automatic review settings March 1, 2026 22:07
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e8f5eb4 and 3d17d6b.

📒 Files selected for processing (1)
  • .mergify.yml

Summary by CodeRabbit

  • Chores
    • Optimized merge automation configuration with improved formatting and cleaner syntax
    • Reintroduced conventional commit enforcement to standardize pull request commit messages

Walkthrough

The pull request updates the .mergify.yml configuration file by removing unnecessary quotes around patterns in queue rules and pull request rules, and reintroducing an "Enforce conventional commit" rule in the merge protections section.

Changes

Cohort / File(s) Summary
Mergify Configuration
.mergify.yml
Removed quotes from test-cross-platform entries in queue_rules, cleaned up quotation syntax across pull_request_rules patterns (release-plz head regex, author/approval conditions), reintroduced Enforce conventional commit rule in merge_protections, and adjusted CI must pass rule formatting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

testing, enhancement

Poem

🐰 A rabbit hops through config files so neat,
Removing quotes makes syntax more sweet,
Conventional commits are back in the fold,
Our merge rules shine, both new and old!
✨ Format cleaned with care and delight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci(Mergify): configuration update' is directly related to the changeset, which contains updates to the .mergify.yml configuration file.
Description check ✅ Passed The description mentions the change was made using the Mergify merge protections editor, which is related to the .mergify.yml configuration changes in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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/I3d8ff2eda3d5d8634447a087314ebc47ec91a62c

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

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 1, 2026

Merge Protections

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

🔴 Enforce conventional commit

This rule is failing.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?!?:

🟢 📃 Configuration Change Requirements

Wonderful, this rule succeeded.

Mergify configuration change

  • check-success = Configuration changed

🟢 CI must pass

Wonderful, this rule succeeded.

All CI checks must pass. This protection prevents manual merges that bypass the merge queue.

  • check-success = coverage
  • check-success = quality
  • check-success = test
  • check-success = test-cross-platform (macos-latest, macOS)
  • check-success = test-cross-platform (ubuntu-22.04, Linux)
  • check-success = test-cross-platform (ubuntu-latest, Linux)
  • check-success = test-cross-platform (windows-latest, Windows)

🟢 Do not merge outdated PRs

Wonderful, this rule succeeded.

Make sure PRs are within 10 commits of the base branch before merging

  • #commits-behind <= 10

@coderabbitai coderabbitai Bot added enhancement New feature or request testing Test infrastructure and coverage labels Mar 1, 2026
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

Updates the repository’s Mergify configuration as generated by the Mergify merge protections editor, primarily reformatting conditions and reordering one merge protection.

Changes:

  • Reformats several check-success and rule conditions (removing YAML quotes / blank lines).
  • Moves the “Enforce conventional commit” merge protection to the end and rewrites its title ~= condition as a multi-line string.

Comment thread .mergify.yml
Comment on lines +104 to +106
- "title ~=
^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\
\\))?:"
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The Enforce conventional commit protection regex changed from the previous pattern and no longer allows the conventional-commits breaking-change marker (!) before the colon (e.g., feat!: ... / feat(scope)!: ...). This will incorrectly fail valid PR titles. Suggest restoring the prior ! support and keeping the condition as a single-line quoted string to avoid introducing whitespace/newlines into the title ~= <regex> expression.

Suggested change
- "title ~=
^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\
\\))?:"
- "title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?(?:!)?:"

Copilot uses AI. Check for mistakes.
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 1, 2026

🧪 CI Insights

Here's what we observed from your CI run for 3d17d6b.

🟢 All jobs passed!

But CI Insights is watching 👀

@dosubot
Copy link
Copy Markdown
Contributor

dosubot Bot commented Mar 1, 2026

Related Documentation

2 document(s) may need updating based on files changed in this PR:

libMagic-rs

CI/CD And Merge Queue Configuration
View Suggested Changes
@@ -112,16 +112,16 @@
 
 ### Required Status Checks
 
-The merge queue requires [seven CI checks to pass](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L4-L11):
-1. **quality** - Code quality checks (fmt, clippy)
-2. **test** - General test suite
-3. **test-cross-platform (ubuntu-latest, Linux)**
-4. **test-cross-platform (ubuntu-22.04, Linux)**
-5. **test-cross-platform (macos-latest, macOS)**
-6. **test-cross-platform (windows-latest, Windows)**
-7. **coverage** - Code coverage checks
-
-These same checks are enforced in the [merge_protections section](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L72-L85) to prevent manual merges that bypass the merge queue.
+The merge queue requires seven CI checks to pass:
+1. `check-success = quality` - Code quality checks (fmt, clippy)
+2. `check-success = test` - General test suite
+3. `check-success = test-cross-platform (ubuntu-latest, Linux)`
+4. `check-success = test-cross-platform (ubuntu-22.04, Linux)`
+5. `check-success = test-cross-platform (macos-latest, macOS)`
+6. `check-success = test-cross-platform (windows-latest, Windows)`
+7. `check-success = coverage` - Code coverage checks
+
+These same checks are enforced in the merge_protections section to prevent manual merges that bypass the merge queue.
 
 #### Release-Plz PR Exemption
 
@@ -138,7 +138,7 @@
 #### Tier 1: Maintainer PRs
 
 [Maintainer PRs are queued](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L15-L23) when:
-- Author is a maintainer (`@maintainers`)
+- Author is a maintainer (`author=@maintainers`)
 - PR has the "lgtm" label
 - No "do-not-merge" label
 
@@ -147,7 +147,7 @@
 Automated PRs from release-plz and Dependabot are auto-queued without human approval.
 
 [Release-plz PRs are auto-queued](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L26-L33) when:
-- Branch name matches `^release-plz-`
+- Branch name matches `head ~= ^release-plz-`
 - Base branch is main
 - No "do-not-merge" label
 
@@ -155,22 +155,30 @@
 - Author is `dependabot[bot]`
 - Base branch is main
 - No "do-not-merge" label
-- The PR does **not** modify `.github/workflows/release.yml` (safety measure)
+- The PR does not modify `.github/workflows/release.yml` (`-files~=\.github/workflows/release\.yml`)
+
+The safety measure blocking modifications to `release.yml` protects the auto-generated cargo-dist workflow from unintended changes that would break the release pipeline.
 
 Dependabot PRs receive automatic approval with the message "Automatically approved by Mergify".
 
+Dosu PRs follow similar rules and receive automatic approval.
+
 #### Tier 3: External Contributor PRs
 
 [External PRs require maintainer approval](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L49-L59) and are queued when:
-- Author is NOT a maintainer
+- Author is NOT a maintainer (`-author=@maintainers`)
 - Author is NOT dependabot[bot]
-- Branch name does NOT match `^release-plz-`
+- Branch name does NOT match `^release-plz-` (`-head ~= ^release-plz-`)
 - Has approval from at least one maintainer (`approved-reviews-by=@maintainers`)
 - No "do-not-merge" label
 
 ### Additional Protections
 
-The configuration includes a [commit-behind protection](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L87-L92) that prevents merging PRs that are more than 10 commits behind the base branch, ensuring PRs remain reasonably up-to-date.
+The merge_protections section enforces requirements on all merge attempts, preventing manual merges that bypass the merge queue. The protections are ordered as follows:
+
+1. **CI must pass** - Requires all seven CI checks (quality, test, test-cross-platform matrix, coverage) to pass
+2. **Do not merge outdated PRs** - Prevents merging PRs that are more than 10 commits behind the base branch
+3. **Enforce conventional commit** - Validates PR titles follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification with the pattern `title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?:`
 
 ## Cargo-Deny Configuration
 
@@ -299,7 +307,7 @@
 
 ### Integration with Mergify
 
-[Mergify auto-approves and auto-queues Dependabot PRs](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L35-L46) with one critical safety measure: PRs modifying `.github/workflows/release.yml` are blocked from auto-merge. This protects the auto-generated cargo-dist workflow from unintended modifications.
+[Mergify auto-approves and auto-queues Dependabot PRs](https://github.com/EvilBit-Labs/libmagic-rs/blob/e925ef6b3f2208fc8805a728ba3de55956f4447a/.mergify.yml#L35-L46) with one critical safety measure: PRs modifying `.github/workflows/release.yml` are blocked from auto-merge (`-files~=\.github/workflows/release\.yml`). This protects the auto-generated cargo-dist workflow from unintended modifications.
 
 ## DCO and Commit Signing Requirements
 

✅ Accepted

release-process /libmagic-rs/blob/main/docs/src/release-process.md
View Suggested Changes
@@ -11,6 +11,40 @@
 - **Major version** (X.0.0): Breaking API changes
 - **Minor version** (0.X.0): New features, backward compatible
 - **Patch version** (0.0.X): Bug fixes, backward compatible
+
+### Conventional Commits
+
+Commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for automated semantic versioning and changelog generation. The required format is:
+
+```
+<type>(<scope>): <description>
+
+[optional body]
+
+[optional footer(s)]
+```
+
+#### Commit Types
+
+- `feat`: Triggers minor version bump (0.X.0)
+- `fix`: Triggers patch version bump (0.0.X)
+- `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`: No version bump
+
+#### Breaking Changes
+
+To trigger a major version bump (X.0.0), indicate breaking changes using a `BREAKING CHANGE:` footer in the commit body:
+
+```
+feat(api): redesign evaluation interface
+
+Replace EvaluationConfig::new() with a builder pattern
+for better ergonomics.
+
+BREAKING CHANGE: EvaluationConfig::new() removed, use
+EvaluationConfig::builder() instead.
+```
+
+The `!` indicator after the type/scope (e.g., `feat!:` or `feat(scope)!:`) is not validated by the Mergify conventional commit enforcement. Use the `BREAKING CHANGE:` footer for reliable detection by both Mergify and release-plz.
 
 ### Pre-release Versions
 

✅ Accepted

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@unclesp1d3r unclesp1d3r closed this Mar 1, 2026
unclesp1d3r pushed a commit that referenced this pull request Mar 6, 2026
Update documentation for
#123

This document provides a complete release process guide for libmagic-rs,
covering semantic versioning, conventional commits, pre-release
checklists, version bumping procedures, and hotfix workflows. It also
documents the automated release system using release-plz and cargo-dist,
including configuration details, authentication methods, and the release
schedule to help maintainers conduct reliable, consistent releases.

_Generated by [Dosu](https://dosu.dev)_

Co-authored-by: dosubot[bot] <131922026+dosubot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files. testing Test infrastructure and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants