Skip to content

feat(ci): apply the ADR-0022 branch shape check and issue link - #490

Merged
ss-o merged 1 commit into
nextfrom
feature-489
Sep 2, 2026
Merged

feat(ci): apply the ADR-0022 branch shape check and issue link#490
ss-o merged 1 commit into
nextfrom
feature-489

Conversation

@ss-o

@ss-o ss-o commented Sep 2, 2026

Copy link
Copy Markdown
Member

Applies decisions/0022-issue-traceability-on-pull-requests.md here, matching
z-shell/.github#600 and z-shell/.github#601. This repository carries the same
commit-lint.yml jobs with their patterns inlined, so it moves in step or the
two copies drift, which ADR-0022 step 5 warns about.

Validate Branch Name becomes a shape check

^((feature|bug|hotfix)-[1-9][0-9]*(-[a-z0-9]+)*
 |(feat|fix|perf|refactor|docs|test|build|ci|style|chore|revert|feature|bug|hotfix)/[a-z0-9]+(-[a-z0-9]+)*)$

feature-<id> stays valid and recommended. next keeps its
persistent-integration exemption under decisions/0019, and the automation
prefixes are unchanged.

Verified against the extracted pattern:

Allowed Rejected
feature-489, bug-1 code/foo
fix/labeler-audit, docs/adr-rollout ss-o-thing
feature/no-id fix/Bad-Caps, bugfix-12

Validate Issue Link is added

Passes on four outcomes and prints which applied, so an exemption is visible in
review rather than silent: an automation branch, next, a meta:no-issue
label, or an issue reference in the body. It reads only the pull_request
event payload, so it needs no token.

Reference forms accepted, each verified: Closes #489, the cross-repository
z-shell/.github#595 shorthand, and a full URL. A body with no work item and
an empty body both fail.

Two things to know before merging

code/ branches are still rejected. code is not in the Conventional
Commits type set that ADR-0022 scoped the <type>/<slug> form to. That was the
accepted decision, not an oversight here.

meta:no-issue does not yet exist as a label in this repository. It is
declared in the organization catalog at z-shell/.github:lib/labels.yml and
reaches here through label sync. Until then the exemption path is simply
unusable; nothing breaks, because the check falls through to the body
reference. Worth syncing before anyone needs the exemption.

actionlint is clean.

Closes #489

z-shell/.github decisions/0022 moves traceability off the branch name and onto
the pull request. This repository carries the same commit-lint jobs with their
patterns inlined, so it moves in step or the two copies drift, which ADR-0022
step 5 warns about.

Validate Branch Name becomes a shape check: <type>-<id> with an optional slug,
which stays valid and recommended, or <type>/<slug> over the Conventional
Commits types plus feature, bug and hotfix. next keeps its
persistent-integration exemption.

Validate Issue Link is added, matching the organization copy. It passes on an
automation branch, next, a meta:no-issue label, or an issue reference in the
body, and says which applied. It reads only the pull_request event payload, so
it needs no token.

code is not in the Conventional Commits type set, so code/ branches remain
rejected here as in the organization repository. That was the accepted scope.

Closes #489
@ss-o
ss-o merged commit f8f3bdf into next Sep 2, 2026
9 checks passed
ss-o added a commit to z-shell/.github that referenced this pull request Sep 2, 2026
Validate Issue Link is registered in the main ruleset now that it has been
observed on a real pull request, so ADR-0022's ordering is satisfied and the
branch check can stop standing in for traceability.

The pattern becomes a shape check: <type>-<id> with an optional slug, which
stays valid and recommended, or <type>/<slug> over the decisions/0003
Conventional Commits types plus feature, bug and hotfix. next keeps its
persistent-integration exemption.

Record the amendment in ADR-0019 beside the clause it changes, and state the
traceability rule in AGENTS.md, so the pointer and the enforcement it describes
arrive together.

'code' is not in the decisions/0003 type set, so code/ branches are still
rejected. That was the accepted scope; widening the type set is a separate
decision.

Steps 4 to 6 of #595. z-shell/zi#490 carries the matching change.

Refs #595
@ss-o
ss-o deleted the feature-489 branch September 2, 2026 23:07
@ss-o ss-o mentioned this pull request Sep 3, 2026
13 tasks
@github-actions github-actions Bot mentioned this pull request Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant