Repository navigation
Labels
effort/mediumEffort Mediumpriority/p1-highPriority P1: high-impact work for the next planned milestonescope/ciGitHub Actions workflows and pre-commit hookssource/agentFiled by an agenttype/refactorType refactor: a new structure, same behaviorvalue/mediumValue Medium
Description
Problem
The reusable PR-title workflow builds its scope list at run time with its own script.
The code (lines at commit 39f92fb):
scripts/pr-title-scopes.sh:23-30reads thescope/*labels of.github/labels.ymlwith yq. It addsci,deps,docs,mainandspec..github/workflows/pr-title.yml:73-131makes a second checkout of this repository and installs mise and yq. It runs the script and passes the list to thescopesinput ofamannn/action-semantic-pull-request.- Size: 30 lines of script, about 50 lines of workflow, and 9 test cases in
tests/test-pr-title-scopes.sh. - This code was in dan-petty/infra before feat: call the workflows of github-workflows infra#235 moved it here.
Breakage in 30 days:
- fix(ci): title check refuses automation scopes infra#189, fix(ci): accept the shared title scopes in each repository infra#190, fix(ci): a cancelled PR title run stops the Renovate automerge #30 (open).
- dan-petty/homelab#386, dan-petty/homelab#389.
- Five PRs in homelab and devcontainer-features failed with
Unknown scope "deps".
The list is already known when Copier renders a repository. Each consumer renders labels.yml from the Copier answer scopes (labels.yml.jinja:13-21, copier.yml:55-67). So the script reads at run time a list that the template wrote at render time.
Change
Pass a static scope list to the scopes input of the action.
- Tool: action-semantic-pull-request (https://github.com/amannn/action-semantic-pull-request), MIT, v6.1.4 (2026-11-24). It has the inputs
scopesandrequireScope. - Add a
scopesinput to the reusable workflowpr-title.yml. Pass it to thescopesinput of the action with no change. - The template caller
templates/repository/.github/workflows/pr-title.yml.jinjarenderswith: scopes:from the Copier answerscopes, plus the fixed scopesci,deps,docs,mainandspec. .github/workflows/pr-title-caller.ymlof this repository writes its own list.- The PR that adds a scope answer also renders the caller again. So the check of that PR reads the new list.
Delete:
scripts/pr-title-scopes.shandtests/test-pr-title-scopes.sh.- The second checkout, the install of mise and yq, and the step "Read the scopes of the labels file" in
pr-title.yml. - The text of the spec
pr-title-scopesthat describes the run-time read.
Out of scope, because they are not a reimplementation:
- fix(ci): a cancelled PR title run stops the Renovate automerge #30 comes from the
cancel-in-progress: truesetting (pr-title.yml:68-70). - The 60-character
subjectPattern(:133) caused fix(deps): name each infra pin dan-petty/infra in titles infra#218 and fix(deps): name each infra pin dan-petty/infra in titles infra#219. It is a project rule, so it stays.
Existing tool considered
- amannn/action-semantic-pull-request (MIT, v6.1.4). Its
scopesinput takes a static list. It does not read labels, and with a rendered list it does not need to. - commitlint
scope-enum(MIT, v21.2.4). It does the same check with a static list. It adds a second tool, so it is not chosen. - No scope list. This is also possible: the action then accepts each scope.
Done when
scripts/pr-title-scopes.sh, its test and the extra workflow steps are deleted.- A Copier render of a consumer gives a caller with
with: scopes:, and actionlint accepts it. - In a consumer, the PR-title check passes for a title with the scope
deps, and fails for a title with an unknown scope.
Source
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p1-highPriority P1: high-impact work for the next planned milestonescope/ciGitHub Actions workflows and pre-commit hookssource/agentFiled by an agenttype/refactorType refactor: a new structure, same behaviorvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 28, 2026
Five PRs in two repositories failed the PR-title check because the runtime scope list was wrong, causing repeated CI check failures for valid work.Both use Copier answers and labels.yml, but item 5 adds a new answer for non-scope labels while the candidate changes how the scope list reaches the PR-title action.dan-petty commentedon Nov 30, 2026
An agent claimed this issue. The change also holds these parts:
scopesofpr-title.ymlis required. A caller that gives noscopesinput cannot start the workflow, so the change is breaking.validateSingleCommit: truegoes, and the workflow gets no input for it. A caller must setsquash_merge_commit_titletoPR_TITLE, as the settings baseline of the template does. The squash commit then gets the pull request title.pull-requests: read. It checks out no file.runs-on: ${{ vars.RUNNER }}. A repository can then move the job to its own runner. With no variable, the job runs onubuntu-26.04.release-please-config.jsongetsbump-minor-pre-major: true. The breaking change then releasesv0.4.0, notv1.0.0.Tests:
tests/test-repository-template.shgets cases for the scopes of the rendered caller. No test reads a workflow of this repository.The criterion about a consumer needs the release and the copier update of that consumer. The pull request cannot show it.
chore(main): release 0.4.0 (#41)
dan-petty commentedon Nov 30, 2026
#40 merged as d11457e, and release
v0.4.0holds it.Proven: a title with the scope
cipassed the check of this repository, and a title with an unknown scope failed it (the comment of #40 gives the runs).Not yet proven: the criterion about a consumer. It needs the copier update of a repository that the template rendered to
v0.4.0. On that update, a title with the scopedepsmust passPR title / Semantic PR title, and a title with an unknown scope must fail it.Follow-up: dan-petty/infra#283 (the caller of infra), dan-petty/devtools#149 (a document), dan-petty/devops-cli#7921 (the title rule of
devops pr).devops-cli-service commentedon Dec 1, 2026
Released in v0.4.0: https://github.com/dan-petty/github-workflows/releases/tag/v0.4.0