mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Adding husky hooks
This commit is contained in:
8
.husky/pre-commit
Normal file
8
.husky/pre-commit
Normal file
@@ -0,0 +1,8 @@
|
||||
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
if [ "$branch" = "main" ]; then
|
||||
echo "You can't commit directly to main - please check out a branch."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TO DO: npx lint-staged
|
||||
17
.husky/pre-push
Normal file
17
.husky/pre-push
Normal file
@@ -0,0 +1,17 @@
|
||||
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
if [ "$branch" = "main" ]; then
|
||||
echo "You can't push directly to main - please check out a branch."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TO DO: npx tsc-silent -p tsconfig.json --suppressConfig tsc-silent.config.js
|
||||
|
||||
# Check for new changesets
|
||||
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
|
||||
echo "Changeset files: $NEW_CHANGESETS"
|
||||
if [ "$NEW_CHANGESETS" == "0" ]; then
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "Changes detected. Please run 'npm run changeset' to create a changeset if applicable."
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
fi
|
||||
Reference in New Issue
Block a user