Repository navigation
Workflow pr title lint
What it does. Fails a pull request when its title is too long or does not fully match a Python regular expression. It reads the title from the event payload, checks out no repository code and holds no token. Calls made by another event print a notice and do nothing.
Why it exists. A title becomes the squash commit subject and the release history. A local hook cannot govern a title typed in GitHub, while a reusable check gives every opt-in repository the same visible branch-protection result.
The default accepts 8 to 120 Unicode characters, starts with a common imperative verb, contains no newline and does not end in
a period. Endings such as (Refs #12) and (Closes #12) are valid. max-length is enforced separately and before regular
expression matching.
pattern replaces the default and is applied with re.fullmatch. allow-prefixes is a comma-separated list such as
release:,chore(deps):; a matching prefix bypasses the pattern, never the length limit.
on:
pull_request:
permissions: {}
jobs:
title:
uses: ChiefGyk3D/git-your-ship-together/.github/workflows/pr-title-lint.yml@<sha> # vX.Y.Z
permissions: {}
with:
allow-prefixes: "release:,chore(deps):"The workflow itself is callable, so GitHub preserves the caller's event. If a caller invokes it from push, schedule or
workflow_dispatch, the job prints a notice and succeeds without inspecting a title.
The title is passed through PR_TITLE, never inserted into a shell program. Workflow-command metacharacters and line breaks are
escaped before an annotation prints the title, the broken rule, the fix and character counts.
Length is checked before the regular expression. Python's re has no timeout argument, so the Linux job uses the stdlib POSIX
interval timer (signal.setitimer) to interrupt re.fullmatch after 0.25 seconds. A malformed or timed-out expression is a
configuration error with a clear annotation and no traceback. scripts/check_pr_title.py is the local, stdlib-only source;
the workflow carries it byte for byte because a reusable workflow cannot read a file from its own pinned commit.
Inputs (8), read from pr-title-lint.yml:
| Input | Type | Default | Meaning |
|---|---|---|---|
pattern |
string | (?=.{8,120}\Z)(?:Add|Adjust|Allow|Avoid|Build|Bump|Change|Clean|Document|Drop|Enable|Enforce|Ensure|Expose|Extend|Fix|Handle|Harden|Implement|Improve|Introduce|Make|Move|Prevent|Refactor|Release|Remove|Rename|Replace|Require|Restore|Revert|Simplify|Support|Test|Update|Upgrade|Use|Write)\b[^\r\n]*[^.\r\n]\Z |
Python-compatible regular expression matched against the whole title. The default requires an imperative-style title of 8 to 120 characters with no trailing period; `(Refs |
max-length |
number | 120 |
Maximum title length in Unicode characters, enforced before prefix or regular-expression matching. |
allow-prefixes |
string | empty | Comma-separated prefixes allowed to bypass the pattern, for example release:,chore(deps):. They never bypass max-length. |
egress-policy |
string | block |
harden-runner egress policy - audit logs outbound connections, block allows only allowed-endpoints. |
egress-policy-secretless |
string | block |
Accepted so callers can pass the standard egress inputs; this secretless job follows this value. |
allowed-endpoints |
string | api.github.com:443 github.com:443 |
harden-runner allow-list for block, space-separated host:port entries. The defaults are the hosts the job's own steps (checkout, harden-runner) reach; they stay as they were. |
extra-allowed-endpoints |
string | empty | Additional space-separated host:port entries appended to allowed-endpoints. |
timeout-minutes |
number | 5 |
Job timeout. |
It never checks out or runs pull request code, never reads a secret, never interpolates the event title into shell source, never lets a prefix bypass the length ceiling, and never attempts a regular expression on an overlong title.
Generated from docs/wiki/ at commit f3af2fa0bae3. Do not edit this wiki: the next push to main replaces every page. Corrections go to docs/wiki/ by pull request.
GYST
- Home
- Why GYST exists
- Getting started
- Design rules
- Secrets: Doppler and OIDC
- Security scanning explained
- The baseline and the weekly audit
- Releases and supply chain
- Keeping a project board current
- Adopting GYST in your own project
- Glossary
- Roadmap
Learn and contribute
- Learning path
- Which workflow do I need?
- Repository map
- Egress control
- Troubleshooting
- Lessons learned
- Testing and the contract
- Contributing and developing
- Maintaining this wiki
- Verify main
- FAQ
CI
Security
Release
- container-release
- python-docker-release
- python-package-release
- artifact-release
- verify-published
- base-image-digest
Docs and project
- docs-pages
- wiki-publish
- project-sync
- threat-model
- lory-audit
- agent-scan
- token-drift
- node-typecheck
- pr-title-lint
- vendored-drift
- upstream-sync
- repin
- pin-comments
Tools