Title: Add ability to run arbitrary hooks pre/post version bump · Issue #292 · commitizen-tools/commitizen · GitHub
Open Graph Title: Add ability to run arbitrary hooks pre/post version bump · Issue #292 · commitizen-tools/commitizen
X Title: Add ability to run arbitrary hooks pre/post version bump · Issue #292 · commitizen-tools/commitizen
Description: Description To use the currently available hook facilities, it is necessary to create a custom cz_ adapter class to use hooks during the version bump / changelog generation. I'd like to be able to run arbitrary hooks (i.e. a shell script...
Open Graph Description: Description To use the currently available hook facilities, it is necessary to create a custom cz_ adapter class to use hooks during the version bump / changelog generation. I'd like to be able to ...
X Description: Description To use the currently available hook facilities, it is necessary to create a custom cz_ adapter class to use hooks during the version bump / changelog generation. I'd like to be able...
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/292
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add ability to run arbitrary hooks pre/post version bump","articleBody":"## Description\r\nTo use the currently available hook facilities, it is necessary to create a custom cz_ adapter class to use hooks during the version bump / changelog generation. I'd like to be able to run arbitrary hooks (i.e. a shell script or other external executable) from a simple configuration file section. In my specific use-case I'd like for the hooks to be run after the changelog generation and before the version bump in case of `cz bump --changelog` (see also #290), but I can imaging the following hook locations to be useful:\r\n\r\n1. before changelog\r\n2. after changelog and before commit and tag\r\n3. after tag\r\n\r\n## Possible Solution\r\nImplement hook facilities at the aforementioned locations. They should be configurable via the configuration file for example as follows, allowing for multiple commands to be run at a given location\r\n\r\n```toml\r\n[[tool.commitizen.hook_begin]]\r\ncommand = \"./update-something.sh\"\r\n\r\n[[tool.commitizen.hook_begin]]\r\ncommand = \"./do-another-thing.sh\"\r\n\r\n[[tool.commitizen.hook_before_commit]]\r\ncommand = \"./build-something-based-on-changelog.sh\"\r\n\r\n[tool.commitizen.hook_end]\r\ncommand = \"./push-artifacts.py\"\r\n```\r\n\r\nGiven commands should run with useful execution context, such as current and future version as arguments and/or environment variables.\r\n\r\n---\r\n\r\nI'd be happy to implement this as well. Cheers.","author":{"url":"https://github.com/janw","@type":"Person","name":"janw"},"datePublished":"2020-11-02T14:58:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/292/commitizen/issues/292"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b6939ad5-f7a8-78e5-6a51-92f2ebaccab6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 897C:3A8D90:E15418F:1250B62C:697721BE |
| html-safe-nonce | b416667bb6ea1d41954aead6502c37dfd15f3f9284c0286abe1dda898a9e5261 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTdDOjNBOEQ5MDpFMTU0MThGOjEyNTBCNjJDOjY5NzcyMUJFIiwidmlzaXRvcl9pZCI6IjIyMDg3Mjk2ODE1NDY5MTIxOTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 57f75407c10570c5652a3458260815b9535d1ba2dea364de241841fbde1f709a |
| hovercard-subject-tag | issue:734574260 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/commitizen-tools/commitizen/292/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87bd254b2e6636a67bfb4293c60a6746d42cc350a6731c53e61ba80c6318e3a2/commitizen-tools/commitizen/issues/292 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87bd254b2e6636a67bfb4293c60a6746d42cc350a6731c53e61ba80c6318e3a2/commitizen-tools/commitizen/issues/292 |
| og:image:alt | Description To use the currently available hook facilities, it is necessary to create a custom cz_ adapter class to use hooks during the version bump / changelog generation. I'd like to be able to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | janw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f752335dbbea672610081196a1998e39aec5e14b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width