Skip to content

ci: add Conventional Commits enforcement for PR titles#337

Merged
jamesadevine merged 4 commits into
mainfrom
feat/pr-title-lint
Apr 28, 2026
Merged

ci: add Conventional Commits enforcement for PR titles#337
jamesadevine merged 4 commits into
mainfrom
feat/pr-title-lint

Conversation

@jamesadevine
Copy link
Copy Markdown
Collaborator

Summary

Adds three layers of defense to ensure PR titles follow the Conventional Commits format required by release-please:

  1. PR template (.github/pull_request_template.md) — shows the convention inline when creating a PR, visible to both humans and agents.
  2. CI lint (.github/workflows/pr-title-lint.yml) — blocks merge if the title doesn't match type(scope): description. Uses amannn/action-semantic-pull-request.
  3. AGENTS.md update — expanded the commit message section to explain that PR titles are the commit messages (squash-merge), that non-conforming titles are blocked by CI and silently dropped from the changelog, and includes a concrete bad/good example.

Context

Several recently merged PRs had non-conventional titles (e.g., Compile: write into directory... instead of feat(compile): write into directory...). These were silently ignored by release-please and won't appear in the changelog. This PR prevents that from happening again.

Test plan

  • The PR title lint workflow was verified by reviewing the action configuration against the action-semantic-pull-request docs.
  • The PR template renders correctly in the GitHub PR creation UI (this PR itself uses the template).
  • AGENTS.md changes reviewed for clarity and accuracy.

jamesadevine and others added 4 commits April 28, 2026 14:19
Adds a GitHub Action that validates PR titles follow the Conventional
Commits format (type(scope): description). Since this repo uses
squash-merge, the PR title becomes the commit message on main, which
release-please uses for changelog generation.

Prevents commits from being silently dropped from the changelog when
merged without a conventional prefix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expand the commit message section to explain that PR titles are the
commit messages (squash-merge), that non-conforming titles are blocked
by CI and silently dropped from the changelog, and include a concrete
bad/good example to guide agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a pull_request_template.md that reminds authors the PR title
becomes the changelog entry via release-please. Includes the format
spec, type→changelog mapping, and a bad/good example.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The pinned SHA for amannn/action-semantic-pull-request was not
resolvable. Replace with a zero-dependency bash regex check that
validates PR titles against the Conventional Commits pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit bbece9e into main Apr 28, 2026
1 check passed
@jamesadevine jamesadevine deleted the feat/pr-title-lint branch April 28, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant