Update merge protections

AS
2d ago
+9-0

This pull request creates the Mergify configuration file .mergify.yml.

Opened by @ashcoft from the Merge Protections page of the Mergify dashboard.


Devin Review

Summary by Sourcery

Enhancements:

  • Add Mergify merge protection requiring pull request titles targeting main to follow the Conventional Commits format.

This change is Reviewable


Summary by cubic

Adds a Mergify merge protection that enforces conventional commit titles on the main branch.

Summary by CodeRabbit

  • Chores
    • Pull requests targeting the main branch must now use a title that follows the conventional commit format. Titles may include an optional scope.

RetriggerView in GreptileConfidence Score: 4/5

Fix the rejection of valid breaking-change titles before merging.

Fix All in CodexFindings

  1. P1 Breaking-change titles are blocked ▶
  2. P2 Invalid titles still pass ▶
Fix with agent prompt
### Issue 1
.mergify.yml:8-9
PRs targeting `main` with valid titles such as `feat!: remove the old API` or `fix(api)!: change error responses` fail this check. The regex requires `:` immediately after the type or scope, even though the release policy explicitly supports `feat!` for major releases. Contributors must remove the marker or remain blocked from merging. Allow an optional `!` before `:`.

```suggestion
        ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\
        \\))?!?:"
```

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
.mergify.yml:9
The regex ends at `:`, so both `fix:` and `fix:no space` satisfy the check. Contributors get a passing result even though these titles lack the required space or description. Require a space followed by a nonblank description so the check enforces the format it promises.

```suggestion
        \\))?: \\S.*"
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds a Mergify protection that checks PR titles targeting main.

  • Mergify checks titles on pull requests targeting main.

Reviews (1) · Last reviewed commit: "Update merge protections" · Reviewed by Greptile