Skip to content

ci: lint pull-request titles against Conventional Commits#461

Open
larsgeorge-db wants to merge 2 commits into
mainfrom
ci-pr-title-lint
Open

ci: lint pull-request titles against Conventional Commits#461
larsgeorge-db wants to merge 2 commits into
mainfrom
ci-pr-title-lint

Conversation

@larsgeorge-db
Copy link
Copy Markdown
Collaborator

Summary

Adds a lightweight CI check that lints PR titles against Conventional Commits, using amannn/action-semantic-pull-request@v5.

  • Accepted types mirror the table in CONTRIBUTING.md > Commit Guidelines > Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
  • Subject (post-colon) must start with a lowercase letter — matches the existing 95% of merged PRs and rejects legacy strays like Feature/ontos approval workflows ux.
  • Scope is optional. CONTRIBUTING.md lists a recommended set but does not enforce it; the workflow preserves that.

Why

PR titles become squash-merge commit messages. Keeping them strictly Conventional Commits means the commit log stays clean for any future release-please / semantic-release / conventional-changelog tooling. This codifies what's already documented in CONTRIBUTING.md and practiced by contributors today; the workflow just prevents drift.

Pairs with the recently-completed issue-title normalization. After both changes:

  • Issues: [Type]: Sentence-case description (human-readable, mixed audience)
  • PRs / commits: type(scope): description (machine-parseable, drives changelog tooling)

These are intentionally different conventions for different artifacts.

Files

  • .github/workflows/pr-title-lint.yml — the new workflow. Runs on pull_request: [opened, edited, synchronize, reopened], read-only permissions.

Test plan

  • CI passes on this PR (the PR title itself conforms, so the check should be green).
  • Open a throwaway draft PR with an intentionally bad title (e.g. Add cool thing) and verify the check fails with a helpful error.
  • Edit a PR title from non-conforming to conforming and verify the check re-runs and passes.

@larsgeorge-db larsgeorge-db requested a review from a team as a code owner May 28, 2026 10:23
@larsgeorge-db larsgeorge-db enabled auto-merge May 28, 2026 15:00
Copy link
Copy Markdown
Contributor

@will-yuponce-db will-yuponce-db left a comment

Choose a reason for hiding this comment

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

Approved! Feel free to merge upon CI passing

@will-yuponce-db
Copy link
Copy Markdown
Contributor

Screenshot 2026-05-29 at 10 47 42 AM

Looks like you'll need to pin the SHA first

larsgeorge-db added a commit that referenced this pull request May 29, 2026
Addresses review feedback on #461: every other third-party action in
this repo is pinned to a full commit SHA with a trailing `# vX.Y.Z`
comment (see .github/workflows/test-coverage.yml). The floating `@v5`
tag bypassed that convention.

Pinned to 0723387faaf9b38adef4775cd42cfd5155ed6017 (v5.5.3), the
current latest in the v5 line.
Adds a `pull_request` workflow that runs
amannn/action-semantic-pull-request@v5 on every PR open/edit/sync/reopen
and rejects titles that don't parse as `type(scope): description` per the
type table in CONTRIBUTING.md (feat, fix, docs, style, refactor, perf,
test, build, ci, chore, revert).

Subject must start with a lowercase letter, matching the existing 95% of
merged PRs. Scope is optional (CONTRIBUTING.md lists recommended scopes
but does not enforce them). Squash-merge inherits the PR title as the
commit message, so this keeps the commit log clean for downstream
changelog/release tooling without touching merged history.

Pairs with the issue-title normalization done separately; together,
issues use `[Type]: Sentence-case` and PRs/commits use Conventional
Commits, which are intentionally different conventions for different
artifacts.
Addresses review feedback on #461: every other third-party action in
this repo is pinned to a full commit SHA with a trailing `# vX.Y.Z`
comment (see .github/workflows/test-coverage.yml). The floating `@v5`
tag bypassed that convention.

Pinned to 0723387faaf9b38adef4775cd42cfd5155ed6017 (v5.5.3), the
current latest in the v5 line.
@larsgeorge-db
Copy link
Copy Markdown
Collaborator Author

Pushed the update with the pinned version. Please review again @will-yuponce-db

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.

2 participants