Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commitizen and Husky configuration not working as expected #431

Closed
Shinigami92 opened this issue May 31, 2020 · 3 comments
Closed

Commitizen and Husky configuration not working as expected #431

Shinigami92 opened this issue May 31, 2020 · 3 comments
Assignees
Labels
bot:stale Issue marked as stale because there was no activity bug Functionality that does not work as intended/expected

Comments

@Shinigami92
Copy link
Contributor

Shinigami92 commented May 31, 2020

Describe the bug

When using npm run commit to commit a change in commitizen valid format, somethinks seems to be wrong configured 🤔

To Reproduce

Steps to reproduce the behavior:

  1. make a change
  2. run npm run commit to commit the change (see screenshot below)
  3. Write some messages
  4. After the last question "Does this change affect any open issues?" answered with N, a husky > pre-commit starts to run
  5. Now when husky > prepare-commit-msg is running all the questions seems to start again! This is a bug I think.

Expected behavior

All the questions should not asked again

When aborting the husky the commit is already done and I can run git push

Screenshots

image

Desktop:

  • OS: Windows 10
  • Terminal: cmd

also

  • OS: macOS Catalina 10.15.4
  • Terminal: zsh
@Shinigami92 Shinigami92 added the bug Functionality that does not work as intended/expected label May 31, 2020
@Shinigami92
Copy link
Contributor Author

Please take a look at this part:

HTMLHint/package.json

Lines 36 to 58 in 526c1e3

"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.(js|md)": [
"npm run prettier"
],
".js": [
"npm run lint:fix",
"npm run lint"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
},
"cz-customizable": {
"config": "commitizen.config.js"
}
},


We may also add ts to "lint-staged" 🤔

@Shinigami92
Copy link
Contributor Author

commitizen/cz-cli#627

@stale
Copy link

stale bot commented Aug 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the bot:stale Issue marked as stale because there was no activity label Aug 1, 2020
@stale stale bot closed this as completed Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:stale Issue marked as stale because there was no activity bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants