René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:605c6e80-7688-c385-5cfa-e4c915bac53b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA0C8:BDE76:1FE3B3B:2BFB480:6A5028F9
html-safe-nonce865ab927915091608ea8e4f4407f9eee0486797522a934cd4aa84eed6c6d0933
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEM4OkJERTc2OjFGRTNCM0I6MkJGQjQ4MDo2QTUwMjhGOSIsInZpc2l0b3JfaWQiOiI4MDMwMzQyNjEzMjk4MDYzNjA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac230ccac10ef61f13448c702220e67900203982e4fe6f9f31ff596cf8e3fa67aa
hovercard-subject-tagpull_request:1345974011
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/740/files
twitter:imagehttps://avatars.githubusercontent.com/u/3247529?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3247529?s=400&v=4
og:image:altAll 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released90666eaf032b7eb8975a378efe38e37f4ebb96c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/pull/740/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F740%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F740%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/pull/740/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/740/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/740/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 344 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
Lee-Whttps://github.com/Lee-W
commitizen-tools:masterhttps://github.com/commitizen-tools/commitizen/tree/master
sacha-c:fix/changelog-only-version-tagshttps://github.com/sacha-c/commitizen/tree/fix/changelog-only-version-tags
Conversation 9 https://github.com/commitizen-tools/commitizen/pull/740
Commits 3 https://github.com/commitizen-tools/commitizen/pull/740/commits
Checks 0 https://github.com/commitizen-tools/commitizen/pull/740/checks
Files changed https://github.com/commitizen-tools/commitizen/pull/740/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
fix: use only version tags in changelog https://github.com/commitizen-tools/commitizen/pull/740/files#top
Show all changes 3 commits https://github.com/commitizen-tools/commitizen/pull/740/files
87df201 fix: only use version tags when generating a changelog sacha-c May 16, 2023 https://github.com/commitizen-tools/commitizen/pull/740/commits/87df2011ef70bd7c95443b09878b22f4ca3852f7
4f7f2b7 style(commands/changelog): remove unnecessary if not block Lee-W Jun 23, 2023 https://github.com/commitizen-tools/commitizen/pull/740/commits/4f7f2b7552214cfdf5f8a7dc376587f0f72908d0
b28670a test(commands/changelog): enhance test_changelog_uses_version_tags_fo… Lee-W Jun 23, 2023 https://github.com/commitizen-tools/commitizen/pull/740/commits/b28670aaff9aecf1290664ed284e666e9bce7ad3
Clear filters https://github.com/commitizen-tools/commitizen/pull/740/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
changelog.py https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
changelog.py https://github.com/commitizen-tools/commitizen/pull/740/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
git.py https://github.com/commitizen-tools/commitizen/pull/740/files#diff-2c36ae6439ace4898e030adb6f7a861fd8e5ae0002ca472cc97e627ea20b3d96
poetry.lock https://github.com/commitizen-tools/commitizen/pull/740/files#diff-f53a023eedfa3fbf2925ec7dc76eecdc954ea94b7e47065393dbad519613dc89
pyproject.toml https://github.com/commitizen-tools/commitizen/pull/740/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
test_changelog_command.py https://github.com/commitizen-tools/commitizen/pull/740/files#diff-0f17f809d9a80303c2327a3d2830cecb7b76156ea47ad96b9dbbc877a08eb144
utils.py https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9e08e8c7769db7b58089fd7659d75ca96df40bb7b5d50299d3a30abd54da9ad6
commitizen/changelog.pyhttps://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
View file https://github.com/sacha-c/commitizen/blob/b28670aaff9aecf1290664ed284e666e9bce7ad3/commitizen/changelog.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/740/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-9a66aca02ea7d31a58e52fc33fc6914dc724c8eb36ccb69f365f86ec3490497b
commitizen/commands/changelog.pyhttps://github.com/commitizen-tools/commitizen/pull/740/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
View file https://github.com/sacha-c/commitizen/blob/b28670aaff9aecf1290664ed284e666e9bce7ad3/commitizen/commands/changelog.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/740/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
commitizen/git.pyhttps://github.com/commitizen-tools/commitizen/pull/740/files#diff-2c36ae6439ace4898e030adb6f7a861fd8e5ae0002ca472cc97e627ea20b3d96
View file https://github.com/sacha-c/commitizen/blob/b28670aaff9aecf1290664ed284e666e9bce7ad3/commitizen/git.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/740/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-2c36ae6439ace4898e030adb6f7a861fd8e5ae0002ca472cc97e627ea20b3d96
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-2c36ae6439ace4898e030adb6f7a861fd8e5ae0002ca472cc97e627ea20b3d96
poetry.lockhttps://github.com/commitizen-tools/commitizen/pull/740/files#diff-f53a023eedfa3fbf2925ec7dc76eecdc954ea94b7e47065393dbad519613dc89
View file https://github.com/sacha-c/commitizen/blob/b28670aaff9aecf1290664ed284e666e9bce7ad3/poetry.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
pyproject.tomlhttps://github.com/commitizen-tools/commitizen/pull/740/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
View file https://github.com/sacha-c/commitizen/blob/b28670aaff9aecf1290664ed284e666e9bce7ad3/pyproject.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/740/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
https://github.com/commitizen-tools/commitizen/pull/740/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/740/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.