mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-03 00:08:22 +00:00
The workflow directory mixed entry points, reusable stages and scheduled jobs into one flat list sorted by topic, so the first question about any file - what starts it - was the one the name did not answer. Every workflow now carries one of three prefixes, derived from its on: block: cron- for a schedule trigger, call- for one only reachable through workflow_call, entry- for everything a repository event or a human starts. Scheduled workflows additionally carry an alarm clock as the first character of their name. Two lints keep it that way. One derives the expected prefix from the triggers and compares it against the file name; it flagged all 17 offenders before the rename and none after. The other resolves every .github/workflows/<file> string in the repository against the directory, which is what a rename silently breaks in Markdown links, Python constants and shell API URLs alike. Renaming pulled 69 pre-existing comments into the comment lint's changed-file scope. The vendored CodeQL template got the nocheck marker its scorecard sibling already carried, two workflow headers moved above name: where they count as file headers, and the remaining banners were deleted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
46 lines
3.5 KiB
Markdown
46 lines
3.5 KiB
Markdown
# Branch 🌿
|
|
|
|
## CI Impact 🔀
|
|
|
|
The branch prefix MUST match the type of change. The [PR workflow](pull-request.md) uses it to classify the scope and decide which CI pipeline to run.
|
|
|
|
| Branch prefix | Scope | Matching files | CI behavior |
|
|
|---|---|---|---|
|
|
| `agent` | Changes to agent instructions or prompts | `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `docs/agents/*` | Skips [orchestrator](../../../../.github/workflows/call-orchestrator.yml), finishes green through the lightweight scope gate. |
|
|
| `documentation` | Documentation-only changes | `**/*.md`, `**/*.rst` (outside agent paths) | Skips [orchestrator](../../../../.github/workflows/call-orchestrator.yml), finishes green through the lightweight scope gate. |
|
|
| `feature` | New features or enhancements | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
| `fix` | Bug fixes | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
| `update` | Automated or maintenance updates | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
| `chore` | Maintenance, dependency, and tooling updates (incl. branches created by [cron-update.yml](../../../../.github/workflows/cron-update.yml)) | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
| `alert-autofix` | Automated alert-triggered fixes | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
| `dependabot` | Automated dependency updates | `*` | Runs the full [orchestrator](../../../../.github/workflows/call-orchestrator.yml) pipeline. |
|
|
|
|
## Enforcement 🔒
|
|
|
|
All rules in this document are actively enforced on `main` via GitHub branch protection. See [branch.md](../../tools/github/branch/security.md) for the full enforcement policy.
|
|
|
|
The naming conventions below are additionally checked locally by the lint test [test_branch_name.py](../../../../tests/lint/repository/naming/test_branch_name.py), which fails `make test-lint` when the checked-out branch uses an unknown prefix (e.g. `feat/` instead of `feature/`) or a non-kebab-case description.
|
|
|
|
## Naming Conventions 🏷️
|
|
|
|
The description MUST use `kebab-case` (lowercase words separated by hyphens) and SHOULD be short enough to read at a glance.
|
|
|
|
The full branch name MUST follow one of the patterns below, depending on whether the change targets a specific role or is general:
|
|
|
|
| Case | Pattern | Example |
|
|
|---|---|---|
|
|
| General feature | `feature/<topic>` | `feature/ldap-integration` |
|
|
| Role feature | `feature/<role>/<topic>` | `feature/web-app-matomo/ldap-integration` |
|
|
| General fix | `fix/<topic>/<ticket-id>` | `fix/dns-resolution/taiga-123` |
|
|
| Role fix | `fix/<role>/<topic>/<ticket-id>` | `fix/web-app-matomo/login-redirect/taiga-789` |
|
|
| General update | `update/<topic>` | `update/docker-image-versions` |
|
|
| Chore | `chore/<topic>` | `chore/update-docker-image-versions` |
|
|
| Alert autofix | `alert-autofix-<alert-id>` | `alert-autofix-261` |
|
|
| Documentation | `documentation/<topic>` | `documentation/contributing-setup` |
|
|
| Agent | `agent/<topic>` | `agent/improve-commit-instructions` |
|
|
| Dependabot | `dependabot/<ecosystem>/<dependency>` | `dependabot/pip/requests-2.32.0` |
|
|
|
|
`feature`, `update`, `documentation`, and `agent` branches MUST NOT reference a ticket ID.
|
|
`alert-autofix` branches reference the alert ID instead of a ticket ID.
|
|
`dependabot` branches are created automatically and MUST NOT be renamed.
|