Title: Discussion on check-consistency · Issue #595 · commitizen-tools/commitizen · GitHub
Open Graph Title: Discussion on check-consistency · Issue #595 · commitizen-tools/commitizen
X Title: Discussion on check-consistency · Issue #595 · commitizen-tools/commitizen
Description: Description Hi, I've doubt on how check-consistency flag works. Steps to reproduce have a project managed with poetry, with a pyproject.toml like the following [tool.poetry] name = "cool_proj" version = "2.5.7" <<<< this is mandatory for...
Open Graph Description: Description Hi, I've doubt on how check-consistency flag works. Steps to reproduce have a project managed with poetry, with a pyproject.toml like the following [tool.poetry] name = "cool_proj" vers...
X Description: Description Hi, I've doubt on how check-consistency flag works. Steps to reproduce have a project managed with poetry, with a pyproject.toml like the following [tool.poetry] name = "cool_p...
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/595
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Discussion on check-consistency","articleBody":"### Description\n\nHi,\r\nI've doubt on how `check-consistency` flag works.\r\n\n\n### Steps to reproduce\n\n1. have a project managed with poetry, with a pyproject.toml like the following\r\n```\r\n[tool.poetry]\r\n name = \"cool_proj\"\r\n version = \"2.5.7\" \u003c\u003c\u003c\u003c this is mandatory for poetry to make the package\r\n...\r\n[tool.commitizen]\r\n name = \"cz_conventional_commits\"\r\n version = \"2.5.2\" \u003c\u003c\u003c\u003c this is mandatory for commitizen\r\n version_files = [\r\n \"cool_proj/__init__.py:__version__\",\r\n \"pyproject.toml:version\"\r\n ]\r\n```\r\nand `__init__.py` contains\r\n```\r\n__version__ = \"2.5.2\"\r\n```\r\n2. run `poetry run cz bump --check-consistency`\r\n\n\n### Current behavior\n\nthe command works, it prints on stdout\r\n```\r\nBump version: 2.5.2 -\u003e 2.5.3 \u003c\u003c\u003c it takes the value from commitizen's toml section\r\ntag to create: 2.5.3\r\n```\r\n\n\n### Desired behavior\n\nthe expected could be a warning about version not consistent, because at least content of `__init__.py` differ from the expected (the one into commitizen's toml section).\r\n\r\nlooking at implementation, also the regex usage has major drawback in this kind of setup, because the regex surely find commitizen's \"version\" attribute, but it can miss the poetry's one, creating package with wrong number (it's taken from poetry section). \n\n### Screenshots\n\n_No response_\n\n### Environment\n\n- commitizen 2.34.0 \r\n- python 3.9.13\r\n- windows 11","author":{"url":"https://github.com/gpongelli","@type":"Person","name":"gpongelli"},"datePublished":"2022-09-23T13:05:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/595/commitizen/issues/595"}
| 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:33fc1c13-91fa-716c-fd2d-c57560a67643 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E68:3B8B53:10C5DF6:1889908:6A4E33CE |
| html-safe-nonce | 51459dcad8e86e485687998255cdd06aeeaa8d22d6918e23ae41cb9e07ec14a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTY4OjNCOEI1MzoxMEM1REY2OjE4ODk5MDg6NkE0RTMzQ0UiLCJ2aXNpdG9yX2lkIjoiODExNjAxNDQzNzYyMDM5NzAwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 399d51476b1f082a637d9030ea2b2a1cb3dc02772bdc35be82fc4d50a84eab12 |
| hovercard-subject-tag | issue:1383780438 |
| 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/595/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa1fb1ad008401f58bb1ad22e93106d5a36575aac77e4a8b49da91a9ada035b9/commitizen-tools/commitizen/issues/595 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa1fb1ad008401f58bb1ad22e93106d5a36575aac77e4a8b49da91a9ada035b9/commitizen-tools/commitizen/issues/595 |
| og:image:alt | Description Hi, I've doubt on how check-consistency flag works. Steps to reproduce have a project managed with poetry, with a pyproject.toml like the following [tool.poetry] name = "cool_proj" vers... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gpongelli |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| 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 | 42a6d378d7587a44c93aca255096cd66b7c8eb2d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width