test / test (push) Successful in 5s
Composite action that validates head branch and PR title against the fritzlab naming standard (role/bug-id/kebab + [bug-id] titles). Always exits 0 (warn-only) until the Bugs system is live. - check.sh: validation logic (branch form, title form, bug-id cross-check) - action.yaml: composite action wrapping check.sh - tests/run: 20-case test matrix (valid/invalid/chore/mismatch/dfritz) - .gitea/workflows/test.yaml: CI that runs the test suite Closes fritzlab/agenthub#559
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Check branch/PR naming
|
|
description: |
|
|
Validates that a PR's head branch and title follow the fritzlab naming
|
|
standard. Always exits 0 — warn-only until the Bugs system is live.
|
|
Produces WARN log lines for any violation.
|
|
|
|
Standard:
|
|
branch: <role>/bug-<id>/<kebab> e.g. dev/bug-x7k2m9/fix-terminal-resize
|
|
chore: chore/<kebab> bug-less trivia only
|
|
title: [bug-<id>] Description (chore PRs: no [bug-id] prefix)
|
|
|
|
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: ''
|
|
|
|
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 }}
|
|
run: bash "${{ github.action_path }}/check.sh"
|