René's URL Explorer Experiment


Title: fix(check): expand env vars in rev_range arg by ilitygergo · Pull Request #1993 · commitizen-tools/commitizen · GitHub

Open Graph Title: fix(check): expand env vars in rev_range arg by ilitygergo · Pull Request #1993 · commitizen-tools/commitizen

X Title: fix(check): expand env vars in rev_range arg by ilitygergo · Pull Request #1993 · commitizen-tools/commitizen

Description: Description Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Code Changes Add test cases to all the changes you introduce Run uv run poe all locally to ensure this change passes linter check and tests Manually test the changes: Verify the feature/bug fix works as expected in real-world scenarios Test edge cases and error conditions Ensure backward compatibility is maintained Document any manual testing steps performed Update the documentation for the changes Documentation Changes Run uv run poe doc locally to ensure the documentation pages renders correctly Check and fix any broken links (internal or external) Expected Behavior The commitizen-branch pre-push hook should successfully validate commit messages using the ref range provided by pre-commit via the PRE_COMMIT_FROM_REF and PRE_COMMIT_TO_REF environment variables. Steps to Test This Pull Request Add the following to your .pre-commit-config.yaml: repos: - repo: https://github.com/commitizen-tools/commitizen rev: master hooks: - id: commitizen stages: [commit-msg] - id: commitizen-branch stages: [pre-push] Install the pre-commit hooks: pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push Make a commit with a valid conventional commit message: git commit -m "feat: my new feature" Run git push — the commitizen-branch hook should pass instead of failing with: fatal: ambiguous argument '$PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF': unknown revision or path not in the working tree Environment used for testing: Python 3.14.3 commitizen 4.15.1 pre-commit 4.6.0 Additional Context The root cause is that pre-commit passes args directly to the process as a list without shell interpolation, so $PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF arrives as a literal string to cz check rather than being expanded to actual git SHAs. Pre-commit does set these as environment variables in the hook process, so os.path.expandvars() correctly resolves them at runtime. Closes #1923 Closes #1912 Related to #704

Open Graph Description: Description Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Code Changes Add test cases to all ...

X Description: Description Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Code Changes Add test cases to all ...

Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/1993

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0e67f77e-fbc5-b66a-6624-aa0fae9fd572
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id83C4:322E35:1307926:19E0AF3:6A4EF698
html-safe-nonce2c52541001a2876428afaa7b92b36fce29ec67b3a65de3f955101503eee57505
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0M0OjMyMkUzNToxMzA3OTI2OjE5RTBBRjM6NkE0RUY2OTgiLCJ2aXNpdG9yX2lkIjoiMzcxNTE4NTc4ODQzNjAxODg0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac63ba90523a07313730e5b26a997009e86d1c67c2e7dbdd2ca219a1eb3b446d02
hovercard-subject-tagpull_request:3681776483
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/1993/files
twitter:imagehttps://avatars.githubusercontent.com/u/33053717?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/33053717?s=400&v=4
og:image:altDescription Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Code Changes Add test cases to all ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/pull/1993/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F1993%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%2F1993%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/1993/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1993/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1993/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/files
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/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
ilitygergohttps://github.com/ilitygergo
commitizen-tools:masterhttps://github.com/commitizen-tools/commitizen/tree/master
ilitygergo:fix/1923-read-from-env-varshttps://github.com/ilitygergo/commitizen/tree/fix/1923-read-from-env-vars
Conversation 4 https://github.com/commitizen-tools/commitizen/pull/1993
Commits 1 https://github.com/commitizen-tools/commitizen/pull/1993/commits
Checks 20 https://github.com/commitizen-tools/commitizen/pull/1993/checks
Files changed https://github.com/commitizen-tools/commitizen/pull/1993/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/files
fix(check): expand env vars in rev_range arg https://github.com/commitizen-tools/commitizen/pull/1993/files#top
Show all changes 1 commit https://github.com/commitizen-tools/commitizen/pull/1993/files
c05a03f fix(check): expand env vars in rev_range arg ilitygergo May 14, 2026 https://github.com/commitizen-tools/commitizen/pull/1993/commits/c05a03f59b01e164a8a5a38af941f1c7fb311b18
Clear filters https://github.com/commitizen-tools/commitizen/pull/1993/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/files
check.py https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
test_check_command.py https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
commitizen/commands/check.pyhttps://github.com/commitizen-tools/commitizen/pull/1993/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
View file https://github.com/commitizen-tools/commitizen/blob/c05a03f59b01e164a8a5a38af941f1c7fb311b18/commitizen/commands/check.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1993/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
tests/commands/test_check_command.pyhttps://github.com/commitizen-tools/commitizen/pull/1993/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
View file https://github.com/commitizen-tools/commitizen/blob/c05a03f59b01e164a8a5a38af941f1c7fb311b18/tests/commands/test_check_command.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1993/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
https://github.com/commitizen-tools/commitizen/pull/1993/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1993/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.