CI checks that PR titles follow Conventional Commits #49

Closed
opened 2026-10-10 11:33:19 +00:00 by piscis · 0 comments
Owner

Parent

#45

What to build

CI rejects a pull request whose title isn't a Conventional Commit. With squash merges, the title becomes the commit on main, and that commit is what the Release notes read.

  • make check-title TITLE=… checks a title against the pattern: the repo's type list, an optional scope, an optional ! for breaking changes, then : and a subject. It needs no extra tool.
  • CI runs it on pull requests and reads the title from the event.
  • Add the edited event type to the pull request trigger, so that fixing only the title re-runs the check, if Forgejo honours that event type. If it doesn't, document in the Forgejo agent doc that a title fix needs a new push.
  • Renovate's titles (e.g. chore(deps): update upstream forgejo-mcp to vX) must pass.

Acceptance criteria

  • make check-title passes for conventional titles, including scoped, breaking (!) and Renovate's chore(deps): … titles
  • It fails with a clear message for a non-conventional title or an unknown type
  • CI runs it on pull requests. A throwaway pull request with a bad title shows CI failing
  • Editing only the title re-runs the check, or the docs say it needs a new push

Blocked by

None (can start immediately).

## Parent #45 ## What to build CI rejects a pull request whose title isn't a Conventional Commit. With squash merges, the title becomes the commit on main, and that commit is what the Release notes read. - `make check-title TITLE=…` checks a title against the pattern: the repo's type list, an optional scope, an optional `!` for breaking changes, then `: ` and a subject. It needs no extra tool. - CI runs it on pull requests and reads the title from the event. - Add the edited event type to the pull request trigger, so that fixing only the title re-runs the check, if Forgejo honours that event type. If it doesn't, document in the Forgejo agent doc that a title fix needs a new push. - Renovate's titles (e.g. `chore(deps): update upstream forgejo-mcp to vX`) must pass. ## Acceptance criteria - [ ] `make check-title` passes for conventional titles, including scoped, breaking (`!`) and Renovate's `chore(deps): …` titles - [ ] It fails with a clear message for a non-conventional title or an unknown type - [ ] CI runs it on pull requests. A throwaway pull request with a bad title shows CI failing - [ ] Editing only the title re-runs the check, or the docs say it needs a new push ## Blocked by None (can start immediately).
Sign in to join this conversation.
No description provided.