#!/usr/bin/env bash
# Conventional Commits, rules in .commitlintrc.yml. Not cosmetic: the release workflow
# reads the type to decide whether to ship the next alpha. commitlint already lets
# merge, revert, fixup! and squash! commits through.
set -uo pipefail
cd "$(git rev-parse --show-toplevel)" || exit 1

command -v commitlint >/dev/null 2>&1 || { echo "commit-msg: commitlint not installed; run \`mise install\`" >&2; exit 1; }
exec commitlint --edit "$1"
