Authored-By: Codex (GPT-5) <noreply@openai.com>
This commit is contained in:
@@ -18,7 +18,6 @@ Title: [bug-x7k2m9] Fix terminal resize loss (chore PRs: no [bug-id] prefix
|
|||||||
- `<bug-id>` is `bug-` followed by lowercase alphanumeric characters
|
- `<bug-id>` is `bug-` followed by lowercase alphanumeric characters
|
||||||
- `<kebab-description>` is lowercase alphanumeric with hyphens, starting with a letter or digit
|
- `<kebab-description>` is lowercase alphanumeric with hyphens, starting with a letter or digit
|
||||||
- When both the branch and the title carry a bug-id they **must match**
|
- When both the branch and the title carry a bug-id they **must match**
|
||||||
- Titles are plain-language imperatives without Conventional Commit syntax
|
|
||||||
- Break-glass: PRs authored by `dfritz` are exempt from all checks
|
- Break-glass: PRs authored by `dfritz` are exempt from all checks
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -70,8 +69,7 @@ The check validates four things for every non-break-glass Agent PR:
|
|||||||
|
|
||||||
2. **Title form** — for a `role/bug` branch the title must start with
|
2. **Title form** — for a `role/bug` branch the title must start with
|
||||||
`[bug-<id>] `. For a `chore` branch the title must have no `[bug-id]`
|
`[bug-<id>] `. For a `chore` branch the title must have no `[bug-id]`
|
||||||
prefix. If both carry a bug-id they must match. Neither form accepts
|
prefix. If both carry a bug-id they must match.
|
||||||
Conventional Commit syntax.
|
|
||||||
|
|
||||||
3. **Tracking and attribution** — on Bug-backed work, `## Tracking` contains both the literal
|
3. **Tracking and attribution** — on Bug-backed work, `## Tracking` contains both the literal
|
||||||
`Fixes bug-<id>` automation token and the matching navigable
|
`Fixes bug-<id>` automation token and the matching navigable
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ description: |
|
|||||||
Standard:
|
Standard:
|
||||||
branch: <role>/bug-<id>/<kebab> e.g. dev/bug-x7k2m9/fix-terminal-resize
|
branch: <role>/bug-<id>/<kebab> e.g. dev/bug-x7k2m9/fix-terminal-resize
|
||||||
chore: chore/<kebab> bug-less trivia only
|
chore: chore/<kebab> bug-less trivia only
|
||||||
title: [bug-<id>] Description (chore PRs: no [bug-id] prefix; no Conventional Commit syntax)
|
title: [bug-<id>] Description (chore PRs: no [bug-id] prefix)
|
||||||
|
|
||||||
Role must be a roster handle: dev | ux | ops | security | perf | architect | support
|
Role must be a roster handle: dev | ux | ops | security | perf | architect | support
|
||||||
Break-glass: PRs authored by dfritz are exempt.
|
Break-glass: PRs authored by dfritz are exempt.
|
||||||
|
|||||||
@@ -92,12 +92,6 @@ if echo "${TITLE}" | grep -qE "^\[bug-[a-z0-9]+\] ."; then
|
|||||||
TITLE_BUG=$(echo "${TITLE}" | sed -E 's|^\[(bug-[a-z0-9]+)\].*|\1|')
|
TITLE_BUG=$(echo "${TITLE}" | sed -E 's|^\[(bug-[a-z0-9]+)\].*|\1|')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PLAIN_TITLE=$(printf '%s\n' "${TITLE}" | sed -E 's/^\[bug-[a-z0-9]+\][[:space:]]+//')
|
|
||||||
if printf '%s\n' "${PLAIN_TITLE}" | grep -qE '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([^)]*\))?!?:[[:space:]]'; then
|
|
||||||
echo "FAIL[check-naming]: title must be a plain-language imperative without Conventional Commit syntax"
|
|
||||||
FAILED=1
|
|
||||||
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 must lead with [${BRANCH_BUG}]"
|
echo "FAIL[check-naming]: title must lead with [${BRANCH_BUG}]"
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ check "bug-id mismatch" 1 "dev/bug-x7k2m9/fix-resize" "[bug-
|
|||||||
|
|
||||||
# fail: chore branch with [bug-id] title prefix
|
# fail: chore branch with [bug-id] title prefix
|
||||||
check "chore with bug-id title" 1 "chore/bump-deps" "[bug-abc123] Bump deps" "dev"
|
check "chore with bug-id title" 1 "chore/bump-deps" "[bug-abc123] Bump deps" "dev"
|
||||||
check "role/bug Conventional title" 1 "dev/bug-x7k2m9/fix-resize" "[bug-x7k2m9] fix(hub): fix resize" "dev"
|
check "role/bug Conventional title" 0 "dev/bug-x7k2m9/fix-resize" "[bug-x7k2m9] fix(hub): fix resize" "dev"
|
||||||
check "chore Conventional title" 1 "chore/bump-deps" "chore(deps): bump deps" "dev"
|
check "chore Conventional title" 0 "chore/bump-deps" "chore(deps): bump deps" "dev"
|
||||||
|
|
||||||
# fail: invalid branch forms
|
# fail: invalid branch forms
|
||||||
check "invalid — no role prefix" 1 "feature/foo-bar" "Add feature" "dev"
|
check "invalid — no role prefix" 1 "feature/foo-bar" "Add feature" "dev"
|
||||||
|
|||||||
Reference in New Issue
Block a user