# BEGIN release-kit
# The release convention's hooks. Install every stage they run at:
# pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push
RK_SWEEP_NOTE - repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [--strict, --force-scope]
- repo: local
hooks:
- id: rk-message
name: rk message content
stages: [commit-msg]
language: system
entry: rk message --check
RK_TRUNK_COMMIT_GUARD - repo: local
hooks:
- id: rk-branch-name
name: rk branch name
language: system
always_run: true
pass_filenames: false
entry: sh -c 'branch=$(git symbolic-ref --quiet --short HEAD) || exit 0; [ "$branch" = RK_TRUNK_BRANCH ] && exit 0; printf %s "$branch" | grep -Eq "RK_BRANCH_GRAMMAR" && exit 0; echo "branch $branch is neither <type>/<slug> nor <issue-id>-<slug>; gh issue develop <issue> --checkout or its glab counterpart mints the linked form" >&2; exit 1'
RK_WORKTREE_GUARDRK_TRUNK_PUSH_GUARD - id: rk-no-hand-authored-tag
name: rk no hand-authored tag
stages: [pre-push]
language: system
always_run: true
pass_filenames: false
entry: sh -c 'case "$PRE_COMMIT_REMOTE_BRANCH" in refs/tags/v*) echo "never author a tag; the release automation mints every v* tag" >&2; exit 1;; esac'
- id: rk-status-check
name: rk status check
language: system
pass_filenames: false
entry: rk status --check --target .
files: '^(\.github/workflows/|\.gitlab-ci\.yml$|\.gitlab/ci/|AGENTS\.md$|\.release-kit/|\.pre-commit-config\.yaml$|release-plz\.toml$|dist-workspace\.toml$|release-please-config\.json$|cliff\.toml$|\.release-please-manifest\.json$|VERSION$)'
# END release-kit