Title: ci: add PR bump preview workflow by bearomorphism · Pull Request #1957 · commitizen-tools/commitizen · GitHub
Open Graph Title: ci: add PR bump preview workflow by bearomorphism · Pull Request #1957 · commitizen-tools/commitizen
X Title: ci: add PR bump preview workflow by bearomorphism · Pull Request #1957 · commitizen-tools/commitizen
Description: Description Adds a GitHub Actions workflow that runs cz bump --dry-run against every incoming pull request and posts (or updates) a sticky comment summarising the would-be version bump and changelog entries. Reviewers can spot unexpected version bumps before merging. The pattern is also documented in docs/tutorials/github_actions.md so other projects can copy/paste the same workflow. How it works Trigger: pull_request_target (matches label_pr.yml) so the workflow has pull-requests: write even for fork PRs. The job only runs cz bump --dry-run, a read-only command, so PR-controlled scripts are not executed. Setup: Uses commitizen-tools/setup-cz — no language-specific toolchain required. Dry-run: Captures cz bump --dry-run --yes output and exit status. Exit code 21 (NoneIncrementExit) is treated as "no eligible bump" instead of an error; other non-zero codes are surfaced in the comment. Sticky comment: A hidden marker lets peter-evans/create-or-update-comment edit the previous preview in place on every push instead of stacking comments. Companion changes are being prepared for commitizen-tools/commitizen-action (replaces the draft #102 attempt) and commitizen-tools/setup-cz (examples/) so the same pattern is available to consumers of either action. Closes #1510 Type of changes CI/CD related Documentation update Steps to Test This Pull Request The workflow self-tests once it lands on master: open a follow-up PR and confirm a 🔍 Commitizen bump preview comment appears and updates as you push commits. Expected output The workflow posts (and replaces on every push) a single sticky comment whose body depends on the dry-run exit code. cz bump --dry-run --yes succeeds (status 0) — eligible bump: Rendered comment 🔍 Commitizen bump preview Merging this PR will produce the following bump: bump: version 4.15.1 → 4.16.0 tag to create: v4.16.0 increment detected: MINOR ## 🔍 Commitizen bump preview Merging this PR will produce the following bump: ``` bump: version 4.15.1 → 4.16.0 tag to create: v4.16.0 increment detected: MINOR ``` NoneIncrementExit (status 21) — no eligible commits: 🔍 Commitizen bump preview No commits in this PR are eligible for a version bump. Any other non-zero status — error surfaced inside the comment: 🔍 Commitizen bump preview ⚠️ cz bump --dry-run exited with status 3: NoCommitsFoundError The status-0 example above is the literal output of cz bump --dry-run --yes against the current master of this repository (verified locally). Checklist My PR title follows conventional commit style Documentation updated
Open Graph Description: Description Adds a GitHub Actions workflow that runs cz bump --dry-run against every incoming pull request and posts (or updates) a sticky comment summarising the would-be version bump and changelo...
X Description: Description Adds a GitHub Actions workflow that runs cz bump --dry-run against every incoming pull request and posts (or updates) a sticky comment summarising the would-be version bump and changelo...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/1957
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c2dbbadc-5e7e-e3a5-e5f2-bd800b52f90f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C780:E5349:60B866:8363A4:6A4DAA91 |
| html-safe-nonce | a88646ed7007cf8d37a00d63f13b67a1dadb5ef58b7484323b18a669e8943c72 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzgwOkU1MzQ5OjYwQjg2Njo4MzYzQTQ6NkE0REFBOTEiLCJ2aXNpdG9yX2lkIjoiMTI1OTA4OTYwNjEzOTAzMDE2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6bdade14d4ba06364a69f635d7edd09badc2548c5c08d9c95b904bf8a77c709c |
| hovercard-subject-tag | pull_request:3654122729 |
| 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/1957/files |
| twitter:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| og:image:alt | Description Adds a GitHub Actions workflow that runs cz bump --dry-run against every incoming pull request and posts (or updates) a sticky comment summarising the would-be version bump and changelo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| 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 | 47723578ce6819210724ef064c858fce6d3115a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width