Skip to content

Commit 2da8db9

Browse files
authored
fix: 🔨 the check-commits recipe wasn't correctly checking them (#48)
## Description I found a bug in the justfile recipe that made the check commit not work correctly. This fixed it. <!-- Select quick/in-depth as necessary --> Doesn't need a review
2 parents 07732d2 + b30223d commit 2da8db9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ build-website:
3434
check-commits:
3535
#!/bin/zsh
3636
branch_name=$(git rev-parse --abbrev-ref HEAD)
37-
number_of_commits=$(git rev-list --count HEAD ^$branch_name)
37+
number_of_commits=$(git rev-list --count HEAD ^main)
3838
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
3939
then
4040
poetry run cz check --rev-range main..HEAD
4141
else
42-
echo "Not on main or haven't committed yet."
42+
echo "Can't either be on ${branch_name} or have more than ${number_of_commits}."
4343
fi

0 commit comments

Comments
 (0)