Files
Lucas RayanandClaude Sonnet 5 5ed6cb2c95
Release / Build image (amd64) (push) Successful in 10m49s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 20m40s
CI / Format and clippy (push) Successful in 5m43s
CI / Tests (Linux) (push) Successful in 16m5s
CI / Dependency audit (push) Successful in 11s
CI / Docker image (build and smoke test) (push) Skipped
Release / Build image (arm64) (push) Successful in 7m34s
Release / Publish tags (push) Successful in 15s
Release / Gitea release (push) Skipped
Release / CLI (linux-aarch64) (push) Skipped
Release / CLI (linux-x86_64) (push) Skipped
refactor!: rename project from Xexéu to Harpia
Renames the whole project, after the harpy eagle: crates
(xexeu-core/xexeu-cli -> harpia-core/harpia-cli), binary (xexeu ->
harpia), admin token env var (XEXEU_ADMIN_TOKEN -> HARPIA_ADMIN_TOKEN),
compose env vars (XEXEU_* -> HARPIA_*), container image
(ciberfauna/xexeu -> ciberfauna/harpia) and the Gitea repository
(ciberfauna/xexeu -> ciberfauna/harpia). Logo updated to the new brand
artwork. All docs (EN/PT-BR), CI workflows, scripts, GUI strings and
the openspec change history updated to match.

BREAKING CHANGE: binary, crate, env var and image names all changed;
existing .env files, scripts and deployments referencing the old
xexeu/XEXEU names must be updated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAyr8cd6jzwpJM9cS1oGjy
2026-11-03 13:43:21 -03:00

43 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Enforces Conventional Commits 1.0.0 and English-only commit messages.
set -euo pipefail
msg_file="${1:?usage: commit-msg <file>}"
python3 - "$msg_file" <<'PY'
import re, sys
from pathlib import Path
raw = Path(sys.argv[1]).read_text(encoding="utf-8")
lines = [l for l in raw.splitlines() if not l.startswith("#")]
while lines and not lines[0].strip():
lines.pop(0)
if not lines:
sys.exit("commit-msg: empty commit message")
subject = lines[0].strip()
if subject.startswith(("Merge ", "Revert \"")):
sys.exit(0)
conv_re = re.compile(
r"^(feat|fix|chore|ci|docs|refactor|test|perf|build|style|revert)(\([a-z0-9_./-]+\))?!?: .+$"
)
if not conv_re.match(subject):
sys.exit(
f"commit-msg: invalid Conventional Commit header: {subject!r}\n"
"Expected: <type>[optional scope]: <description in English>\n"
"Allowed types: feat, fix, chore, ci, docs, refactor, test, perf, build, style, revert"
)
body = "\n".join(lines)
cleaned = re.sub(r"\b(Guará|Sabiá|Acauã|Harpia|Ciberfauna)\b", "", body)
pt_accents = re.search(r"[áàâãéêíóôõúçÁÀÂÃÉÊÍÓÔÕÚÇ]", cleaned)
pt_words = re.search(
r"\b(não|para|como|quando|então|pelos|pelas|pelo|pela|estão|está|também|versão|"
r"corrige|adiciona|atualiza|remove|padroniza|implementa|ajusta|arquivo|arquivos)\b",
cleaned,
re.I,
)
if pt_accents or pt_words:
sys.exit("commit-msg: commit messages must be written 100% in English.")
PY