Title: fix: use only version tags in changelog by sacha-c · Pull Request #740 · commitizen-tools/commitizen · GitHub
Open Graph Title: fix: use only version tags in changelog by sacha-c · Pull Request #740 · commitizen-tools/commitizen
X Title: fix: use only version tags in changelog by sacha-c · Pull Request #740 · commitizen-tools/commitizen
Description: All tags used to generate the changelog must be version tags. This PR fixes two issues: The 'latest' commit was not being checked for it being a version tag, which can result in some non-version tag written as a header for the changelog The rev-range created when running cz changelog 3.2.0 could use a non-version tag as a lower-bound, resulting in an incomplete changelog if the non-version tag was in the middle of two versions. Description Changelogs should be generated only with version tags as headers. Tags are indeed being checked that they are version tags when generating the changelog here, but this logic is missing for the latest commit's tag. This means that changelogs can be generated with an incorrect tag for the latest version For example, if I have a project with a commit "feat: some change" tagged with a tag "i_am_not_a_version", running cz changelog will generate something like: See that the output is ## i_am_not_a_version (2023-05-10) ### Feat - some change instead of ## Unreleased ... or ## 0.1.0 (2023-05-10) ... Checklist Add test cases to all the changes you introduce Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test Test the changes on the local machine manually Update the documentation for the changes (not relevant) Expected behavior The changelog should only contain version tags Steps to Test This Pull Request On a project with commitizen setup touch some-change git commit -m "feat: some change" git tag a-tag-that-has-nothing-to-do-with-versions cz changelog --dry-run closes #741
Open Graph Description: All tags used to generate the changelog must be version tags. This PR fixes two issues: The 'latest' commit was not being checked for it being a version tag, which can result in some non-v...
X Description: All tags used to generate the changelog must be version tags. This PR fixes two issues: The 'latest' commit was not being checked for it being a version tag, which can result in so...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/740
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:605c6e80-7688-c385-5cfa-e4c915bac53b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A0C8:BDE76:1FE3B3B:2BFB480:6A5028F9 |
| html-safe-nonce | 865ab927915091608ea8e4f4407f9eee0486797522a934cd4aa84eed6c6d0933 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEM4OkJERTc2OjFGRTNCM0I6MkJGQjQ4MDo2QTUwMjhGOSIsInZpc2l0b3JfaWQiOiI4MDMwMzQyNjEzMjk4MDYzNjA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 230ccac10ef61f13448c702220e67900203982e4fe6f9f31ff596cf8e3fa67aa |
| hovercard-subject-tag | pull_request:1345974011 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/740/files |
| twitter:image | https://avatars.githubusercontent.com/u/3247529?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3247529?s=400&v=4 |
| og:image:alt | All tags used to generate the changelog must be version tags. This PR fixes two issues: The 'latest' commit was not being checked for it being a version tag, which can result in some non-v... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width