Files
check-naming/action.yaml
Donavan FritzandClaude Fable 5.1 4c17d84dd2
test / test (pull_request) Successful in 12s
Accept Mission work branches and native Ticket ids
AgentHub supplies every Mission a work_branch of the form mission/<mission-id>,
and Bug ids were retired in favour of native Ticket ids. The check accepted
neither, so no Mission-driven pull request could pass validate / naming in a
consumer that pins this action (t-mazzph405ay0).

A Mission branch needs a Conventional title and the visible attribution, and
no Tracking section, because the Mission is the tracking. Role branches now
carry a native Ticket id or the retired Bug id; the title and Tracking rules
are unchanged apart from the id they name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 11:35:54 -06:00

60 lines
2.2 KiB
YAML

name: Check PR contract
description: |
Validates that a PR's branch, title, Bug tracking, and PR-description AI attribution
follow the fritzlab Git standard. Fails (exits 1) on any violation, with
FAIL log lines naming it. Warn-only wiring is the consumer's choice: set
continue-on-error: true on the job (or pin @v1, which never fails).
Standard:
branch: <role>/t-<ticket-id>/<kebab> e.g. dev/t-mazzph405ay0/fix-terminal-resize
<role>/bug-<id>/<kebab> retired Bug ids remain accepted
mission: mission/mi-<mission-id> the work_branch AgentHub supplies to a Mission
chore: chore/<kebab> untracked trivia only
title: [t-<ticket-id>] type(scope): description, or type(scope): description on a Mission branch
Role must be a roster handle: dev | ux | ops | security | perf | architect | support
Break-glass: PRs authored by dfritz are exempt.
inputs:
head-branch:
description: Head branch name — github.head_ref on pull_request events.
required: true
pr-title:
description: PR title — github.event.pull_request.title.
required: true
pr-author:
description: |
PR author login — github.event.pull_request.user.login.
dfritz is exempt from all checks.
required: false
default: ''
server-url:
description: Gitea server URL — github.server_url.
required: true
token:
description: Gitea Actions token — github.token.
required: true
base-sha:
description: Base commit SHA — github.event.pull_request.base.sha.
required: true
head-sha:
description: Head commit SHA — github.event.pull_request.head.sha.
required: true
runs:
using: composite
steps:
- name: Validate naming
shell: bash
env:
HEAD_BRANCH: ${{ inputs.head-branch }}
PR_TITLE: ${{ inputs.pr-title }}
PR_AUTHOR: ${{ inputs.pr-author }}
GITEA_SERVER_URL: ${{ inputs.server-url }}
GITEA_TOKEN: ${{ inputs.token }}
GITEA_REPOSITORY: ${{ github.repository }}
GITEA_PR_NUMBER: ${{ github.event.pull_request.number }}
BASE_SHA: ${{ inputs.base-sha }}
HEAD_SHA: ${{ inputs.head-sha }}
run: bash "${{ github.action_path }}/check.sh"