Title: [Config loader] check if config key is in package.json before accepting it as a config file · Issue #975 · commitizen/cz-cli · GitHub
Open Graph Title: [Config loader] check if config key is in package.json before accepting it as a config file · Issue #975 · commitizen/cz-cli
X Title: [Config loader] check if config key is in package.json before accepting it as a config file · Issue #975 · commitizen/cz-cli
Description: Hello, I'm working on a monorepo with backend and frontend and a .czrc at the directory's root to enforce commit rules with commitizen. All frontend-related files are in a subdirectory, including the package.json file at different filesy...
Open Graph Description: Hello, I'm working on a monorepo with backend and frontend and a .czrc at the directory's root to enforce commit rules with commitizen. All frontend-related files are in a subdirectory, including t...
X Description: Hello, I'm working on a monorepo with backend and frontend and a .czrc at the directory's root to enforce commit rules with commitizen. All frontend-related files are in a subdirectory, inc...
Opengraph URL: https://github.com/commitizen/cz-cli/issues/975
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Config loader] check if config key is in package.json before accepting it as a config file","articleBody":"Hello, \r\n\r\nI'm working on a monorepo with backend and frontend and a `.czrc` at the directory's root to enforce commit rules with commitizen.\r\n\r\nAll frontend-related files are in a subdirectory, including the `package.json` file at different filesystem levels.\r\n\r\n**My issue**: In a subdirectory with a package.json between `pwd` and git repository root, `commitizen` seems to acknowledge this file as a configuration file despite the lack of `config.commitizen` key.\r\n\r\n**Fix proposal**: There seems to be a mechanism to check the package.json has a commitizen configuration, but it is commented: https://github.com/commitizen/cz-cli/blob/2e57fd02a5fd2b2dcf89d3235a6956edaeaf672c/src/configLoader/loader.js#L30-L36\r\n\r\nI tried to uncomment it in a local version of commitizen, and it works as expected. \r\nWould it be possible to uncomment it or does it have unwanted side effects?\r\n\r\n","author":{"url":"https://github.com/simrobin","@type":"Person","name":"simrobin"},"datePublished":"2023-06-12T10:04:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/975/cz-cli/issues/975"}
| 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:c357d14d-a69d-0d8a-f38e-35dc605cc325 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E568:2EB4B1:131ACC:1B66F5:6A5F5C4A |
| html-safe-nonce | 91b787e2c2c4d2219885b799e051c3031140e642b5d05914ba7c4c76f18b15d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTY4OjJFQjRCMToxMzFBQ0M6MUI2NkY1OjZBNUY1QzRBIiwidmlzaXRvcl9pZCI6IjQ3MDMyMDEzMDY0NTQ0ODE5OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8251be6439a3bc516e2e71422978127a6b9a400ea042cb2180e8e2f9be3dcf95 |
| hovercard-subject-tag | issue:1752381715 |
| 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/cz-cli/975/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81c89e0bbd6f5197252ba670b7be88c27ecc855e6e7e423da7afff5a553dfb7d/commitizen/cz-cli/issues/975 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81c89e0bbd6f5197252ba670b7be88c27ecc855e6e7e423da7afff5a553dfb7d/commitizen/cz-cli/issues/975 |
| og:image:alt | Hello, I'm working on a monorepo with backend and frontend and a .czrc at the directory's root to enforce commit rules with commitizen. All frontend-related files are in a subdirectory, including t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | simrobin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a0797c11799dbfd7df57fa3de31c7ea3a4c4bd055eb1a0427a5cde1d4d7ba3f |
| turbo-cache-control | no-preview |
| go-import | github.com/commitizen/cz-cli git https://github.com/commitizen/cz-cli.git |
| octolytics-dimension-user_id | 11980392 |
| octolytics-dimension-user_login | commitizen |
| octolytics-dimension-repository_id | 34230966 |
| octolytics-dimension-repository_nwo | commitizen/cz-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 34230966 |
| octolytics-dimension-repository_network_root_nwo | commitizen/cz-cli |
| 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 | b099d96da147aea31036cd16b2fba0083a6defe4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width