chore: add gitea ci/cd skeleton
Some checks failed
CI / commitlint (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / commitlint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
Some checks failed
CI / commitlint (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / commitlint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
This commit is contained in:
20
scripts/commit-msg.sh
Normal file
20
scripts/commit-msg.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Local commit-msg hook using commitlint via npx (no Docker/GHCR auth required).
|
||||
# Usage: scripts/commit-msg.sh <commit-msg-file>
|
||||
|
||||
MSG_FILE="${1:?path to commit message file required}"
|
||||
|
||||
if ! command -v npx >/dev/null 2>&1; then
|
||||
echo "npx not found. Install Node.js and run: npm install --save-dev @commitlint/cli" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure commitlint is available (installed as devDependency)
|
||||
if ! npx --yes @commitlint/cli@latest --help >/dev/null 2>&1; then
|
||||
echo "Install commitlint locally: npm install --save-dev @commitlint/cli" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
npx --yes @commitlint/cli@latest --config .commitlintrc.yml --edit "${MSG_FILE}"
|
||||
Reference in New Issue
Block a user