ci(Mergify): configuration update#123
Conversation
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe pull request updates the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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. 🔴 Enforce conventional commitThis rule is failing.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📃 Configuration Change RequirementsWonderful, this rule succeeded.Mergify configuration change
🟢 CI must passWonderful, this rule succeeded.All CI checks must pass. This protection prevents manual merges that bypass the merge queue.
🟢 Do not merge outdated PRsWonderful, this rule succeeded.Make sure PRs are within 10 commits of the base branch before merging
|
There was a problem hiding this comment.
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-successand 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.
| - "title ~= | ||
| ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\ | ||
| \\))?:" |
There was a problem hiding this comment.
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.
| - "title ~= | |
| ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\ | |
| \\))?:" | |
| - "title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?(?:!)?:" |
🧪 CI InsightsHere's what we observed from your CI run for 3d17d6b. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
Related Documentation 2 document(s) may need updating based on files changed in this PR: libMagic-rs CI/CD And Merge Queue ConfigurationView 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
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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>
This change has been made by @unclesp1d3r from the Mergify merge protections editor.