Reject Conventional Commit PR titles

Authored-By: Codex (GPT-5) <noreply@openai.com>
This commit is contained in:
2026-08-27 18:24:37 +00:00
parent 6fe42b2ad2
commit c09fc72500
3 changed files with 12 additions and 3 deletions
+6
View File
@@ -121,6 +121,12 @@ if echo "${TITLE}" | grep -qE "^\[bug-[a-z0-9]+\] ."; then
TITLE_BUG=$(echo "${TITLE}" | sed -E 's|^\[(bug-[a-z0-9]+)\].*|\1|')
fi
TITLE_DESCRIPTION=$(printf '%s\n' "${TITLE}" | sed -E 's/^\[bug-[a-z0-9]+\] //')
if printf '%s\n' "${TITLE_DESCRIPTION}" | grep -qE '^[[:alnum:]-]+(\([^)]*\))?!?:[[:space:]]'; then
echo "FAIL[check-naming]: title must use a plain-language imperative without Conventional Commit syntax"
FAILED=1
fi
if [ "${BRANCH_KIND}" = "role-bug" ]; then
if [ -z "${TITLE_BUG}" ]; then
echo "FAIL[check-naming]: title must lead with [${BRANCH_BUG}]"