Skip to content

Commit acbaf17

Browse files
committed
[main]: update hooks
1 parent 806c18d commit acbaf17

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

.githooks/pre-commit

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,6 @@ echo "Running pre-commit checks for branch: $BRANCH_NAME"
2121
echo "$BRANCH_NAME" | grep -Eq '^(feature|bugfix|hotfix|task)/[A-Za-z]+-[0-9]+'
2222
if [ $? -ne 0 ]; then
2323
echo "Error: Branch name '$BRANCH_NAME' is invalid."
24-
echo "Use a valid branch naming convention, e.g., feature/XYZ-123-description."
24+
echo "Use a valid branch naming convention, e.g., feature|bugfix|hotfix|task/XYZ-123."
2525
exit 1
2626
fi
27-
28-
# Step 2: Run poetry linting tools
29-
echo "Running poetry linting tools..."
30-
if ! poetry run flake8 .; then
31-
echo "flake8 failed. Aborting commit."
32-
exit 1
33-
fi
34-
35-
if ! poetry run black --check .; then
36-
echo "black failed. Aborting commit."
37-
exit 1
38-
fi
39-
40-
if ! poetry run mypy .; then
41-
echo "mypy failed. Aborting commit."
42-
exit 1
43-
fi
44-
45-
echo "Pre-commit checks passed!"
46-
exit 0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"lint": "prettier -w --cache . && prettier -w --cache **/*.astro",
4545
"clean": "rm -rf dist rm -rf build",
4646
"nuke": "shx rm -rf node_modules && rm package-lock.json && npm run clean",
47-
"postinstall": "shx ./setup-hooks.sh"
47+
"postinstall": "bash ./setup-hooks.sh"
4848
},
4949
"dependencies": {
5050
"@astrojs/check": "0.9.4",

0 commit comments

Comments
 (0)