Skip to content

ci: check PR titles for Conventional Commits - #269

Merged
dermatz merged 4 commits into
mainfrom
ci/pr-title-lint
Nov 6, 2026
Merged

dermatz merged 4 commits into
mainfrom
ci/pr-title-lint

Conversation

@dermatz

@dermatz dermatz commented Nov 6, 2026

Copy link
Copy Markdown
Member

Summary

Release Please builds the changelog from the PR title of squash-merged pull requests. #267 was merged as a plain merge commit and its title and commits start with an emoji, so Release Please logged commit could not be parsed and the change is missing from the release PR (#250).

This PR adds a guard so that this cannot happen silently again.

Changes

  • New PR Title workflow that fails when the PR title is not a valid Conventional Commit (feat, fix, refactor, perf, docs, style, chore, test, build, ci, revert, optional scope, optional !). The Release Please PR (release-please--* branches) is skipped. The title is passed via env and only used as regex match data.
  • CONTRIBUTING.md: PR titles must not start with an emoji (commit messages inside the PR may), and plain merge / rebase merges must not be used.

Follow-up for maintainers

The workflow cannot prevent a plain merge. In Settings > General > Pull Requests, disable "Allow merge commits" and "Allow rebase merging", keep "Allow squash merging" with "Default to pull request title". Optionally add PR Title as a required status check.

Testing

  • The title pattern was checked against feat(hyva): add check, feat: implement x, chore: upgrade trunk linters, fix!: change and feat(deps-dev): update infection/infection requirement (accepted) and against ✨ feat(hyva): x and Next Release 0.29.0 (rejected, the latter is skipped by the branch condition).
  • trunk check on the markdown file is clean. The local pinact run reports a tool configuration error (unknown flag: -format) for every workflow, including the existing label.yml.

Release Please ignores PR titles that are not Conventional Commits, so
changes silently vanish from the changelog.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:23
@github-actions github-actions Bot added documentation Improvements or additions to documentation CI/CD labels Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The title guard can be bypassed through a contributor-controlled branch name and incorrectly rejects valid Conventional Commit titles with uppercase scopes.

2 open issues
What changed in this PR

This PR adds PR-title validation to help Release Please include squash-merged changes in the changelog.

Changes:

  • Adds a Conventional Commit title check, with an exemption for Release Please branches.
  • Clarifies that PR titles must not start with emojis and that maintainers must use squash merging.
File Description
CONTRIBUTING.md Clarifies title formatting and squash-merge requirements.
.github/​workflows/​pr-title.yml Adds automated PR-title validation using an environment-provided title.

Review effort: Balanced

Comment thread .github/workflows/pr-title.yml Resolved
Comment thread .github/workflows/pr-title.yml Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the PR-title validation and contributor-guidance changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

pinact 5.0.2 fails with pinact/config-error on every workflow change
because the trunk plugins still pass single-dash flags.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Using pull_request lets contributors modify the workflow to pass the required check without validating the PR title.

1 open issue

Review effort: Balanced

name: PR Title

on:
pull_request:
@dermatz
dermatz merged commit a7447d9 into main Nov 6, 2026
20 of 21 checks passed
@dermatz
dermatz deleted the ci/pr-title-lint branch November 6, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants