fix(check-naming): print corrected title on missing-prefix failure
test / test (pull_request) Successful in 6s

When a role-bug branch has no [bug-id] prefix in the PR title, the check
now prints what the title should be:

  FAIL[check-naming]: title must lead with [bug-r095xkfgt2vz]
    have: fix(agenthub/bugs): budget unpark quote in bytes not runes
    want: [bug-r095xkfgt2vz] fix(agenthub/bugs): budget unpark quote in bytes not runes

The bug id is already parsed from the branch, so the corrected title is
mechanically derivable — no guesswork needed from the author.

Part of bug-hvhthrwf9ry8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dev
2026-08-25 02:04:17 +00:00
co-authored by Claude Sonnet 4.6
parent a9c5282f16
commit 5d0c72201e
+3 -1
View File
@@ -41,7 +41,9 @@ fi
if [ "${BRANCH_KIND}" = "role-bug" ]; then if [ "${BRANCH_KIND}" = "role-bug" ]; then
if [ -z "${TITLE_BUG}" ]; then if [ -z "${TITLE_BUG}" ]; then
echo "FAIL[check-naming]: title missing [${BRANCH_BUG}] prefix for branch '${BRANCH}'" echo "FAIL[check-naming]: title must lead with [${BRANCH_BUG}]"
echo " have: ${TITLE}"
echo " want: [${BRANCH_BUG}] ${TITLE}"
FAILED=1 FAILED=1
elif [ "${TITLE_BUG}" != "${BRANCH_BUG}" ]; then elif [ "${TITLE_BUG}" != "${BRANCH_BUG}" ]; then
echo "FAIL[check-naming]: bug-id mismatch — branch carries '${BRANCH_BUG}' but title carries '${TITLE_BUG}'" echo "FAIL[check-naming]: bug-id mismatch — branch carries '${BRANCH_BUG}' but title carries '${TITLE_BUG}'"