René's URL Explorer Experiment


Title: ci(pythonpublish): add workflow_dispatch trigger for republishing tags by bearomorphism · Pull Request #1981 · commitizen-tools/commitizen · GitHub

Open Graph Title: ci(pythonpublish): add workflow_dispatch trigger for republishing tags by bearomorphism · Pull Request #1981 · commitizen-tools/commitizen

X Title: ci(pythonpublish): add workflow_dispatch trigger for republishing tags by bearomorphism · Pull Request #1981 · commitizen-tools/commitizen

Description: Description Closes #1790. Why The publish run for v4.11.1 failed at the time of the original tag push and the release is absent from PyPI — confirmed by the triage comment on #1790: "Confirmed via https://pypi.org/pypi/commitizen/json — 4.11.1 is not in the release history." GitHub disallows re-running workflow runs older than 30 days via the UI or API, so the original job cannot be retried. The practical recovery options are: recreate the tag (which re-fires the GitHub release workflow and risks breaking downstream automation that watches tag events), use a separate ad-hoc workflow, or add a workflow_dispatch trigger to the existing publish workflow so a maintainer can invoke it manually for any tag. The third option is the least invasive — it touches only the trigger block and one checkout parameter — and it becomes a permanent escape hatch for any future failed publish run without requiring tag recreation or out-of-band tooling. What changed File Change .github/workflows/pythonpublish.yml Add workflow_dispatch trigger with a required ref string input; update the actions/checkout step to use ${{ inputs.ref || github.ref_name }} How it works workflow_dispatch block (.github/workflows/pythonpublish.yml:4–7 on master, extended by the patch): a single required string input named ref is declared, so the Actions UI presents a labelled text field when "Run workflow" is clicked. Marking it required: true prevents an accidental no-argument dispatch that would fall through to an ambiguous default. Checkout fallback expression: the checkout step's ref parameter changes from the hardcoded ${{ github.ref_name }} at .github/workflows/pythonpublish.yml:20 (master) to ${{ inputs.ref || github.ref_name }}. On push events the inputs context is empty, so the expression short-circuits to github.ref_name — the tag that triggered the push — producing identical behaviour to the previous value. On workflow_dispatch events inputs.ref is the maintainer-supplied tag string and that value is used directly. Repository guard unchanged (.github/workflows/pythonpublish.yml:11, master): the if: ${{ github.repository == 'commitizen-tools/commitizen' }} condition on the deploy job applies to both trigger types, so forks cannot accidentally publish by dispatching this workflow. OIDC trusted-publisher path unchanged: the permissions: id-token: write block at .github/workflows/pythonpublish.yml:13–15 (master) is preserved as-is. The PyPI trusted-publisher configuration accepts OIDC tokens issued for workflow_dispatch events on the same terms as for push events — no PyPI-side reconfiguration is needed. Backward compatibility The automatic push: tags: ["v*"] trigger at .github/workflows/pythonpublish.yml:4–7 (master) is unchanged; all future automatic releases behave identically. fetch-depth: 0 is preserved so the full tag history remains available to uv build and to commitizen's own version introspection. No Python source files are touched; uv run poe all reports no new lint or type errors. Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Generated-by: Claude following the guidelines 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 (see "Steps to Test" below) Update the documentation for the changes Expected Behavior Scenario Outcome Normal tag push (e.g., v4.16.0) Workflow triggers automatically; inputs.ref is empty so github.ref_name is used — identical to pre-patch behaviour Manual dispatch with ref = v4.11.1 Workflow checks out the v4.11.1 tag, runs uv build, and publishes to PyPI via the existing OIDC trusted-publisher flow Manual dispatch from a fork deploy job is skipped; github.repository != 'commitizen-tools/commitizen' Manual dispatch with no value in the ref field UI blocks submission because required: true is set Steps to Test This Pull Request git fetch fork fix/1790-publish-workflow-dispatch git checkout fork/fix/1790-publish-workflow-dispatch # 1. Targeted regression test — validate YAML syntax. python -c "import yaml; yaml.safe_load(open('.github/workflows/pythonpublish.yml')); print('OK: YAML parses cleanly')" # 2. Reproduce-the-bug-then-verify-the-fix sequence. # Before this PR: republishing v4.11.1 requires recreating the tag. # After merge: a maintainer can dispatch the workflow manually. # # Structural verification (can be run pre-merge): python - <<'EOF' import yaml wf = yaml.safe_load(open(".github/workflows/pythonpublish.yml")) triggers = wf["on"] assert "push" in triggers, "push trigger missing" assert "workflow_dispatch" in triggers, "workflow_dispatch trigger missing" inp = triggers["workflow_dispatch"]["inputs"]["ref"] assert inp["required"] is True, "ref input must be required" assert inp["type"] == "string", "ref input must be type string" steps = wf["jobs"]["deploy"]["steps"] checkout = next(s for s in steps if "actions/checkout" in str(s.get("uses", ""))) assert "inputs.ref" in checkout["with"]["ref"], "checkout ref must use inputs.ref fallback" guard = wf["jobs"]["deploy"]["if"] assert "commitizen-tools/commitizen" in guard, "repo guard must still be present" print("OK: workflow structure is correct") EOF # Post-merge functional test (requires maintainer access): # 1. Go to https://github.com/commitizen-tools/commitizen/actions/workflows/pythonpublish.yml # 2. Click "Run workflow" → enter "v4.11.1" in the ref field → "Run workflow" # 3. Verify the run succeeds and https://pypi.org/project/commitizen/4.11.1/ becomes available Additional Context This fix was surfaced during the #1964 issue audit. The triage comment on #1790 confirmed that v4.11.1 remains absent from PyPI and that the original workflow run is too old to be re-run through the GitHub UI. The workflow_dispatch trigger is intentionally minimal — a single ref input, no pre-flight tag validation — to keep the diff small and the blast radius low. A potential follow-up hardening would add a git describe --exact-match --tags "$ref" pre-flight check to guard against accidentally dispatching with a branch name (PyPI would reject a duplicate version upload, but the build step would still run unnecessarily); that is left as a separate issue to keep this PR focused on unblocking the v4.11.1 republish.

Open Graph Description: Description Closes #1790. Why The publish run for v4.11.1 failed at the time of the original tag push and the release is absent from PyPI — confirmed by the triage comment on #1790: "Confirmed...

X Description: Description Closes #1790. Why The publish run for v4.11.1 failed at the time of the original tag push and the release is absent from PyPI — confirmed by the triage comment on #1790: &quot;Confi...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:dc368d1d-64e4-5ed7-fa59-7f389a73a465
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9ED2:FB1CA:84A58F:B6ECF3:6A4DB5B0
html-safe-nonceebdfee0261cedaa0017306770f02ef5ffa1371e6c579277e701e72c8f9ad55a2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUQyOkZCMUNBOjg0QTU4RjpCNkVDRjM6NkE0REI1QjAiLCJ2aXNpdG9yX2lkIjoiMzAwMTU5MTI4MzAzNjU2Njk2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac39da58a7909e6e80796b484e2dcea73d55ca2780838ff592d4ed7dd4523dad1a
hovercard-subject-tagpull_request:3654799234
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/1981/files
twitter:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
og:image:altDescription Closes #1790. Why The publish run for v4.11.1 failed at the time of the original tag push and the release is absent from PyPI — confirmed by the triage comment on #1790: "Confirmed...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
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
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release32f7b614aca06e6bbd89842b1370df1328264f68
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/pull/1981/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F1981%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/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/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/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%2F1981%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/1981/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1981/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1981/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 343 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
bearomorphism:fix/1790-publish-workflow-dispatchhttps://github.com/bearomorphism/commitizen/tree/fix/1790-publish-workflow-dispatch
Conversation 7 https://github.com/commitizen-tools/commitizen/pull/1981
Commits 2 https://github.com/commitizen-tools/commitizen/pull/1981/commits
Checks 20 https://github.com/commitizen-tools/commitizen/pull/1981/checks
Files changed https://github.com/commitizen-tools/commitizen/pull/1981/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
ci(pythonpublish): add workflow_dispatch trigger for republishing tags https://github.com/commitizen-tools/commitizen/pull/1981/files#top
Show all changes 2 commits https://github.com/commitizen-tools/commitizen/pull/1981/files
c18277f ci(pythonpublish): add workflow_dispatch trigger for republishing tags bearomorphism May 9, 2026 https://github.com/commitizen-tools/commitizen/pull/1981/commits/c18277f8544448b9d4aecafe8fae59c8f045e340
b07aa91 fix(ci): use github.event.inputs context and require tag ref for disp… bearomorphism May 9, 2026 https://github.com/commitizen-tools/commitizen/pull/1981/commits/b07aa91719c7094598a09a4e08b1e02e4b756af1
Clear filters https://github.com/commitizen-tools/commitizen/pull/1981/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
.github/workflows/pythonpublish.ymlhttps://github.com/commitizen-tools/commitizen/pull/1981/files#diff-a59524abd7f2742db7365aa7ccecc939b56b227b92b77b33882978ebe8b228ed
View file https://github.com/bearomorphism/commitizen/blob/b07aa91719c7094598a09a4e08b1e02e4b756af1/.github/workflows/pythonpublish.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1981/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1981/files#diff-a59524abd7f2742db7365aa7ccecc939b56b227b92b77b33882978ebe8b228ed
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/files
https://github.com/commitizen-tools/commitizen/pull/1981/files#diff-a59524abd7f2742db7365aa7ccecc939b56b227b92b77b33882978ebe8b228ed
https://github.com/commitizen-tools/commitizen/pull/1981/files#diff-a59524abd7f2742db7365aa7ccecc939b56b227b92b77b33882978ebe8b228ed
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1981/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.