We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check-commits
1 parent 07732d2 commit b30223dCopy full SHA for b30223d
justfile
@@ -34,10 +34,10 @@ build-website:
34
check-commits:
35
#!/bin/zsh
36
branch_name=$(git rev-parse --abbrev-ref HEAD)
37
- number_of_commits=$(git rev-list --count HEAD ^$branch_name)
+ number_of_commits=$(git rev-list --count HEAD ^main)
38
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
39
then
40
poetry run cz check --rev-range main..HEAD
41
else
42
- echo "Not on main or haven't committed yet."
+ echo "Can't either be on ${branch_name} or have more than ${number_of_commits}."
43
fi
0 commit comments