Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
allowRemediationCommits:
individual: true
thirdParty: true
Comment thread
unclesp1d3r marked this conversation as resolved.
11 changes: 7 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
rebase-strategy: "disabled"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
interval: "weekly"
rebase-strategy: "disabled"

- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
interval: "weekly"
rebase-strategy: "disabled"
Comment thread
unclesp1d3r marked this conversation as resolved.
38 changes: 35 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,63 @@ queue_rules:
- check-success = coverage

pull_request_rules:
- name: Queue PRs when approved
# Tier 1: Maintainer PRs -- queue when maintainer adds 'lgtm' label
- name: Queue maintainer PRs with lgtm label
conditions:
- base = main
- "#approved-reviews-by >= 1"
- "author=@maintainers"
- label = lgtm
- label != do-not-merge
actions:
queue:
name: default

# Tier 2: Trusted bot PRs -- auto-queue when checks pass
- name: Auto-queue release-plz PRs
conditions:
- base = main
- "head ~= ^release-plz-"
- label != do-not-merge
actions:
queue:
name: default

- name: Auto-queue dependabot PRs
- name: Auto-approve and queue dependabot PRs
conditions:
- base = main
- author = dependabot[bot]
- label != do-not-merge
- -files~=\.github/workflows/release\.yml
actions:
review:
type: APPROVE
message: Automatically approved by Mergify
Comment thread
unclesp1d3r marked this conversation as resolved.
queue:
name: default

# Tier 3: All other PRs (external contributors, copilot) -- require maintainer approval
- name: Queue external PRs when approved by maintainer
conditions:
- base = main
- "-author=@maintainers"
- author != dependabot[bot]
- "-head ~= ^release-plz-"
- "approved-reviews-by=@maintainers"
- label != do-not-merge
Comment on lines +35 to +56
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The dependabot rule explicitly excludes PRs that touch .github/workflows/release.yml (-files~=...), but the other queueing rules also exclude author = dependabot[bot]. That combination means dependabot PRs that modify release.yml won’t be queued by Mergify at all (even after maintainer approval/label), which may strand those PRs outside the merge queue. Consider adding a separate rule to allow those PRs to be queued when a maintainer approves or applies lgtm (without auto-approving them).

Copilot uses AI. Check for mistakes.
actions:
queue:
name: default

- name: Keep PRs up to date with main
conditions:
- base = main
- -conflict
- -draft
- -author = dependabot[bot]
Comment thread
unclesp1d3r marked this conversation as resolved.
- label != do-not-merge
Comment thread
unclesp1d3r marked this conversation as resolved.
actions:
update: {}

merge_protections:
- name: CI must pass
description: >-
Expand Down
9 changes: 7 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ This pattern ensures build-time failures (e.g., invalid magic files) are properl

### Automated Checks

The project includes automated CI checks via `.kiro/hooks/ci-auto-fix.kiro.hook`:
The project uses GitHub Actions CI with Mergify merge queue:

1. **Formatting**: `cargo fmt` for consistent code style
2. **Linting**: `cargo clippy -- -D warnings` for best practices
Expand Down Expand Up @@ -430,7 +430,9 @@ All pull requests require review before merging. Reviews are performed by mainta
- **Style**: Follows project conventions, passes `cargo fmt` and `cargo clippy -- -D warnings`
- **Documentation**: Public APIs have rustdoc with examples, AGENTS.md updated if architecture changes

CI must pass before merge. Branch protection enforces these checks on the `main` branch.
CI must pass before merge. Mergify merge queue and merge protections enforce these checks.
PRs enter the merge queue when approved (or automatically for release-plz/dependabot).
Mergify rebases against main, runs CI, and squash-merges on success.

## Project Context

Expand Down Expand Up @@ -509,6 +511,9 @@ This guide ensures consistent, high-quality development practices for the libmag

## Quick Reference

- Merging is managed by Mergify merge queue -- PRs are squash-merged after CI passes
- `.mergify.yml` configures merge queue rules, auto-queue, and merge protections
- `cargo deny check` uses `deny.toml` (default) -- do not specify a custom config path
- `.github/workflows/release.yml` is auto-generated by cargo-dist -- do not modify manually
- All `.rs` files must have copyright and SPDX headers (see any source file for format)
- `Cargo.lock` and `mise.lock` are committed for reproducible builds -- do not gitignore
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ libmagic-rs uses a **maintainer-driven** governance model. Decisions are made by

| Role | Responsibilities | Current |
|------|-----------------|---------|
| **Maintainer** | Merge PRs, manage releases, set project direction, review security reports | [@unclesp1d3r](https://github.com/unclesp1d3r), [@kmelton](https://github.com/kmelton) |
| **Maintainer** | Merge PRs, manage releases, set project direction, review security reports | [@unclesp1d3r](https://github.com/unclesp1d3r), [@KryptoKat08](https://github.com/KryptoKat08) |
| **Contributor** | Submit issues, PRs, and participate in discussions | Anyone following this guide |

### How Decisions Are Made
Expand Down
Loading
Loading