Files
check-naming/action.yaml
T

60 lines
2.0 KiB
YAML
Raw Normal View History

name: Check PR contract
2026-07-25 19:01:08 +00:00
description: |
Validates that a PR's branch, title, Bug tracking, and 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
2026-07-26 18:05:26 +00:00
continue-on-error: true on the job (or pin @v1, which never fails).
2026-07-25 19:01:08 +00:00
Standard:
branch: <role>/bug-<id>/<kebab> e.g. dev/bug-x7k2m9/fix-terminal-resize
chore: chore/<kebab> bug-less trivia only
2026-08-27 17:36:56 +00:00
title: [bug-<id>] Description (chore PRs: no [bug-id] prefix)
2026-07-25 19:01:08 +00:00
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: ''
pr-body:
description: PR description — github.event.pull_request.body.
required: true
2026-08-27 17:26:13 +00:00
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
2026-07-25 19:01:08 +00:00
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 }}
PR_BODY: ${{ inputs.pr-body }}
2026-08-27 17:26:13 +00:00
GITEA_SERVER_URL: ${{ inputs.server-url }}
GITEA_TOKEN: ${{ inputs.token }}
BASE_SHA: ${{ inputs.base-sha }}
HEAD_SHA: ${{ inputs.head-sha }}
2026-07-25 19:01:08 +00:00
run: bash "${{ github.action_path }}/check.sh"