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

Commitlint working fine for the repo in first cloned directory but not on the new cloned directory or in Azure Repo or in Visual Studio #4206

Open
1 of 4 tasks
bharath2023 opened this issue Dec 12, 2024 · 0 comments

Comments

@bharath2023
Copy link

Steps to Reproduce

npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js

npm install --save-dev husky
npx husky init
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
npx commitlint --from HEAD~1 --to HEAD --verbose
git commit -m "foo: this will fail"
         Failure - Expected
git commit -m "chore: lint on commitmsg"
         Success - Expce

Current Behavior

  1. First step: Local setup is done for the repo called "devops" by following the official document
    https://commitlint.js.org/guides/local-setup.html.

Hook is working fine within the local cloned working directory called "devops"
Success: It blocks the commits as the message doesn't consist of type - Expected

  1. Second Step: All the code changes like npm nodemodules, husky were pushed to the remote orgin. In other directory - tried cloning the same repo "devops" with all commit lint configs.

Failure: It doesn't block the commit message though the conventional type is missing.

  1. Third Test: Direct commit in Visual studio without the type - Failure
  2. Firth Test: Direct commit in azure repo without the type in mesaage - Failure

Expected Behavior

Error-Commitlint.docx

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli@19.6.0

git --version

git version 2.47.1.windows.1

node --version

10.9.0

@bharath2023 bharath2023 changed the title Commitlint working fine the repo in one local directory but not on the other new cloned directory or in Azure Repo or in Visual Studio Commitlint working fine for the repo in first cloned directory but not on the new cloned directory or in Azure Repo or in Visual Studio Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants