Repository navigation
ci: lint the PR title, and match the analyzer's preset to the notes generator - #71
Merged
Merged
Conversation
…enerator Squash is the only merge method here, and `squash_merge_commit_title` is COMMIT_OR_PR_TITLE, so for any PR with more than one commit the PR title becomes the subject of the commit that lands on main — and that subject is the only thing semantic-release reads. commitlint sees the commits inside the PR, which the squash then discards, so a title with no conventional type is a silent no-release. #41 shipped inside 2.2.5 with no note of its own, and #65 produced no release at all. A title check now runs on every pull request, including on `edited`, so a retitle re-checks. `@semantic-release/commit-analyzer` also carried no `preset` and so defaulted to `angular`, while the notes generator was explicitly `conventionalcommits`. The two now match. That is not only tidiness: `angular` does not recognise the `!` breaking-change shorthand, so `feat!: …` passed commitlint and then analysed as no release at all. Verified against both presets — `feat!:` is `none` under angular and `major` under conventionalcommits; every other type agrees. CONTRIBUTING gains the rules and a type-to-release table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request configures the @semantic-release/commit-analyzer plugin to use the conventionalcommits preset in .releaserc.json and adds a new 'Commits and releases' section to CONTRIBUTING.md to document the release process and conventional commit requirements. The feedback suggests expanding the commit types table in the documentation to include other common non-releasing types like style, build, and ci for completeness.
The `!` is read only from the commit subject and a `BREAKING CHANGE:` footer only from the body, so under squash merging the bang counts in the PR title while the footer counts in a commit inside the PR. Both verified against the configured analyzer, including the shape GitHub actually produces. Also rewraps the section: the file keeps a paragraph on one line, and the first draft hard-wrapped at 100 columns. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The no-release row named four of the seven. `style`, `build` and `ci` are declared in .releaserc.json too, and all three analyse as no release. Also notes that "none" is about triggering a release, not visibility: every declared type has its own section, so it still appears in the notes of whatever release it rides along in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both came in with the release config and neither is used here. Removing them from the presetConfig changes nothing about release types — both still analyse as no release — but such a commit is now hidden from the notes rather than given its own section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ethan-Arrowood
marked this pull request as ready for review
October 8, 2026 20:27
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
## [2.3.0](v2.2.5...v2.3.0) (2026-10-08) ### Features * back the `use cache` directive with Harper and persist per-entry cache lives ([#65](#65)) ([5bcd077](5bcd077)) ### Continuous Integration * lint the PR title, and match the analyzer's preset to the notes generator ([#71](#71)) ([9ebd026](9ebd026)), closes [#41](#41) [#65](#65)
|
🎉 This PR is included in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Follow-up to the missed release for #65.
mainhas theuse cachework but no version was cut: semantic-release ran and reportedAnalysis of 1 commits complete: no release.Why
Squash is the only merge method on this repo, and
squash_merge_commit_titleisCOMMIT_OR_PR_TITLE— so for any PR with more than one commit, GitHub uses the PR title as the subject of the commit that lands onmain. That subject is the only thing semantic-release reads for the release type; thefeat:/fix:subjects of the squashed commits end up in the body, where the parser does not look.verify-commits.yamlpassed becausewagoid/commitlint-github-actionlints the commits inside the PR. All 30 of #65's were conventional. The squash then replaced them with the one string nothing ever linted.It has happened twice:
fix: match ISR cache rows…Use Harper readonly mode for Next.js buildsBack the `use cache` directive…Changes
verify-commits.yaml— apr-titlejob linting the PR title on every pull request.editedis already in the trigger list, so retitling re-checks..releaserc.json—preset: conventionalcommitson@semantic-release/commit-analyzer, matching the notes generator.CONTRIBUTING.md— the rules and a type-to-release table.The preset is not just tidiness
commit-analyzerhad nopresetand so defaulted toangular, while the notes generator was explicitlyconventionalcommits.angulardoes not recognise the!breaking-change shorthand, sofeat!: …— which@commitlint/config-conventionalaccepts — analysed as no release at all. A breaking change announced that way would have shipped without a major, or without any version.Verification
Ran
analyzeCommitsdirectly against both presets:feat:fix:/perf:revert:BREAKING CHANGE:footerfeat!:docs:/test:/chore(deps):/refactor:Only
feat!:differs, and the new preset is the correct answer. The last row reproduces the defect: the subject that landed onmainyields no release under either preset — which is what the PR-title lint prevents.Not covered here
squash_merge_commit_titleis a repository setting, not a file. It is currentlyCOMMIT_OR_PR_TITLE, so a single-commit PR uses that commit's subject instead of the title. Setting it toPR_TITLEwould make the linted string always the one that lands. Worth doing, but it needs a repo admin.🤖 Generated with Claude Code