-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds pre-push and pre-commit hooks Closes #11
- Loading branch information
rfgvieira
committed
Jun 25, 2024
1 parent
584841b
commit 7510ab1
Showing
7 changed files
with
6,004 additions
and
4,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
|
||
#TODO: after setup python lint run command on pre-commit | ||
# add tests if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
#TODO: pre-pushes python test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
h | ||
husky.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
cd dashboard && pnpm lint | ||
pnpm pycommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
REMOTE="$1" | ||
MASTER_REF=${MASTER_REF:-$REMOTE/main} | ||
|
||
if ! read LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA; then | ||
echo "NOTE: nothing to push, nothing to check" | ||
exit 0 | ||
fi | ||
|
||
if [ "$LOCAL_REF" = "(delete)" ]; then | ||
echo "NOTE: deleting branch, nothing to check" | ||
exit 0 | ||
fi | ||
|
||
cd dashboard && pnpm pypush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.