Skip to content

chore: adopt commitlint and release-please for Conventional Commits automation - #49

Merged
teknikqa merged 3 commits into
mainfrom
chore/conventional-commits-release-please
Sep 2, 2026
Merged

teknikqa merged 3 commits into
mainfrom
chore/conventional-commits-release-please

Conversation

@teknikqa

@teknikqa teknikqa commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the manual release/vX.Y.Z branch + hand-edited CHANGELOG.md process with commitlint + release-please, enforced on Conventional Commit PR titles.

What Changed

  • commitlint: package.json/commitlint.config.js (extends @commitlint/config-conventional), and .git-hooks/commit-msg now calls commitlint --edit instead of a hand-rolled regex — same 11 commit types as before, skips gracefully if pnpm/commitlint aren't installed.
  • PR title gate: .github/workflows/pr-title.yml lints PR titles with amannn/action-semantic-pull-request. Since PRs are squash-merged, the PR title becomes the commit on main that release-please reads, so this is the enforcement point that actually matters.
  • release-please: release-please-config.json + .release-please-manifest.json (seeded to 1.0.0) + .github/workflows/release-please.yml. It keeps a release PR up to date on main, regenerating CHANGELOG.md from conventional commits, and creates the tag + GitHub Release when that PR is merged.
  • .goreleaser.yaml gets release.mode: keep-existing so the GoReleaser run triggered by that tag push attaches binaries without clobbering release-please's release notes.
  • Dropped the dead ## [Unreleased] heading/footer link from CHANGELOG.md — release-please opens a dated section directly in its release PR instead of maintaining a rolling unreleased section.

Why

Releases were manual and error-prone: a hand-edited changelog entry got missed on one release and needed a follow-up PR to fix. release-please automates version bump + changelog + tag + GitHub Release from commit messages, so it only needed Conventional Commits to actually be enforced — which the old local-only regex hook didn't guarantee once commits reached the squash-merged main history.

conventional-changelog isn't wired in as a separate package — release-please implements the same parsing/changelog-generation internally, so there's no place a standalone CLI step would add anything once release-please owns the changelog.

Reviewer notes

  • First release under this setup: after merging, the next feature PR to land should trigger release-please.yml to open a release PR — worth checking its generated CHANGELOG.md diff looks right before merging it.
  • release.mode: keep-existing is already GoReleaser's default; made explicit here to document why the two workflows are safe to chain (release-please creates the release, GoReleaser only attaches artifacts to it).

Replaces the hand-rolled regex in .git-hooks/commit-msg with
commitlint + @commitlint/config-conventional, matching the same
11 commit types the old hook enforced.
PRs are squash-merged, so the PR title becomes the commit on main
that release-please will parse — this is the enforcement point that
actually matters, complementing the local commitlint hook.
release-please now owns CHANGELOG.md and version/tag/release creation,
generated from Conventional Commit PR titles, replacing the manual
release-branch process. GoReleaser is set to keep-existing release
notes so it only attaches build artifacts to the release release-please
already created for the tag.

Drops the dead [Unreleased] heading from CHANGELOG.md — release-please
opens a dated section directly in its release PR instead of maintaining
a rolling unreleased section.
@teknikqa teknikqa changed the title Adopt commitlint + release-please for Conventional Commits automation chore: adopt commitlint and release-please for Conventional Commits automation Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@teknikqa
teknikqa merged commit 84cd9d1 into main Sep 2, 2026
12 of 13 checks passed
@teknikqa
teknikqa deleted the chore/conventional-commits-release-please branch September 2, 2026 04:02
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