Repository navigation
chore: adopt commitlint and release-please for Conventional Commits automation - #49
Merged
Merged
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the manual
release/vX.Y.Zbranch + hand-editedCHANGELOG.mdprocess with commitlint + release-please, enforced on Conventional Commit PR titles.What Changed
package.json/commitlint.config.js(extends@commitlint/config-conventional), and.git-hooks/commit-msgnow callscommitlint --editinstead of a hand-rolled regex — same 11 commit types as before, skips gracefully ifpnpm/commitlint aren't installed..github/workflows/pr-title.ymllints PR titles withamannn/action-semantic-pull-request. Since PRs are squash-merged, the PR title becomes the commit onmainthat release-please reads, so this is the enforcement point that actually matters.release-please-config.json+.release-please-manifest.json(seeded to1.0.0) +.github/workflows/release-please.yml. It keeps a release PR up to date onmain, regeneratingCHANGELOG.mdfrom conventional commits, and creates the tag + GitHub Release when that PR is merged..goreleaser.yamlgetsrelease.mode: keep-existingso the GoReleaser run triggered by that tag push attaches binaries without clobbering release-please's release notes.## [Unreleased]heading/footer link fromCHANGELOG.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
mainhistory.conventional-changelogisn'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
release-please.ymlto open a release PR — worth checking its generatedCHANGELOG.mddiff looks right before merging it.release.mode: keep-existingis 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).