Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions template/justfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ build-website:
uv run quartodoc build
uv run quarto render --execute

# Run checks on commits with non-main branches
# Check the commit messages on the current branch that are not on the main branch
check-commits:
#!/bin/zsh
#!/usr/bin/env bash
branch_name=$(git rev-parse --abbrev-ref HEAD)
number_of_commits=$(git rev-list --count HEAD ^main)
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
then
uv run cz check --rev-range main..HEAD
# If issue happens, try `uv tool update-shell`
uvx --from commitizen cz check --rev-range main..HEAD
else
echo "Can't either be on ${branch_name} or have more than ${number_of_commits}."
echo "On 'main' or current branch doesn't have any commits."
fi

# Run basic security checks on the package
Expand Down
Loading