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

[Issue#7, Issue3] add husky hook config - enforce branch naming convention #8

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

bugITwhisperer
Copy link
Collaborator

@bugITwhisperer bugITwhisperer commented Oct 23, 2023

Resolves #7 && Partially Resolves #3

Scope of changes

  • add Husky library to the project,
  • create bash script to enforce branch naming validation as per defined pattern

If the branch does not match the pattern, the below error message is displayed (highlighted in red):
2023-10-23_20h02_59

Please note that npm package validate-branch-name was not used after all :)


Husky installation steps

I performed the following installation steps:

  1. npm install husky --save-dev
  2. npx husky add .husky/pre-commit
  3. add the created script to the file: kawqa-gad-playwright\.husky\pre-commit

@kat-kan
Copy link
Owner

kat-kan commented Nov 7, 2023

Hi @bugITwhisperer can you please check if the installation steps cover everything? I tried to test the solution but sth doesn't seem to be working. The error messages point to this line ". "$(dirname -- "$0")/_/husky.sh" and this is my .husky directory
image

.husky/pre-commit Show resolved Hide resolved
.husky/pre-commit Show resolved Hide resolved
.husky/pre-commit Outdated Show resolved Hide resolved
@bugITwhisperer bugITwhisperer merged commit 4555709 into main Nov 8, 2023
@bugITwhisperer bugITwhisperer deleted the chore/ISSUE-7_enforce_branch_naming_precommit branch November 8, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore: configuration Project configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Branch naming standards Github workflow standards && project standards to be established
2 participants