[READ-ONLY] Mirror of https://github.com/thoda-dev/shhh. Self-hostable zero-knowledge pastebin for secrets that expire on their own
docker end-to-end-encryption nuxt nuxtjs pastebin secrets selft-hosted zero-knowledge
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233#!/bin/sh## Rejects a commit message that is not a Conventional Commit.## Enabled by `pnpm install`, which points core.hooksPath here — no husky, no dependency. Bypass a# single commit with `git commit --no-verify` when you have a good reason; the CI check on pull# request titles is the one that actually gates what lands.set -euTYPES='feat|fix|docs|refactor|perf|test|build|ci|chore'subject=$(head -n1 "$1")# Git writes these itself, or they disappear in a rebase before anyone sees them.case "$subject" in 'Merge '* | 'Revert '* | 'fixup!'* | 'squash!'* | 'amend!'* | '#'*) exit 0 ;;esacif printf '%s' "$subject" | grep -qE "^($TYPES)(\([a-z0-9,/.-]+\))?!?: .+"; then exit 0fiprintf '\033[31merror\033[0m the commit message is not a Conventional Commit.\n\n' >&2printf ' got: %s\n\n' "$subject" >&2printf ' expected: type(scope): subject\n' >&2printf ' type is one of: %s\n\n' "$(printf '%s' "$TYPES" | tr '|' ' ')" >&2printf ' examples: feat(pastes): allow a per-paste read limit\n' >&2printf ' fix(auth): stop require_2fa being bypassed by disabling 2FA\n' >&2printf ' docs: document the nginx reverse proxy setup\n\n' >&2printf 'The release script builds CHANGELOG.md from these messages: anything that does not\n' >&2printf 'match is dropped from the changelog entirely rather than listed badly.\n' >&2exit 1