Skip to content

ci(#545): exempt sync/ branches from the PR-create ticket-ID rule#546

Merged
atlas-apex merged 1 commit into
devfrom
ci/GH-545-sync-pr-exemption
Jun 6, 2026
Merged

ci(#545): exempt sync/ branches from the PR-create ticket-ID rule#546
atlas-apex merged 1 commit into
devfrom
ci/GH-545-sync-pr-exemption

Conversation

@atlas-apex

Copy link
Copy Markdown
Collaborator

Summary

  • Exempts sync/main-to-dev-after-vN.N.N branches from the branch-ticket-ID rule in validate-pr-create.sh — these /release-sync branches carry no ticket ID by design (the release being synced is the ticket), exactly like the release/vN.N.N branches the hook already exempts. Without this, every post-release sync PR is blocked with missing ticket ID.
  • One-line change to the existing exemption alternation — adds |^sync/main-to-dev-after-v[0-9]+\.[0-9]+\.[0-9]+$ alongside the release-cut pattern, plus a clarifying comment citing apexyard#458. The PR-title path already accepts the sync(#N): shape; only the branch path was wrong.
  • Closes the gap between the hook and its documented behaviourvalidate-branch-name.sh whitelists the sync type ([Chore] /release-sync — reconcile sync type with branch/commit/PR whitelists #458) and the /release-sync skill states sync branches are exempt, but this hook never implemented it. Surfaced live while cutting v3.0.0 (the sync PR had to be unblocked with a local edit, which this PR lands properly).

Testing

  1. bash bin/run-hook-tests.sh → green (no regression in the hook suite).
  2. Manual: a branch named sync/main-to-dev-after-v3.0.0 now passes the branch-ticket-ID check; release/v3.0.0 still passes; a genuinely malformed branch (e.g. foo-bar) is still rejected.
  3. shellcheck --severity=warning .claude/hooks/validate-pr-create.sh → clean.

Closes #545


Glossary

Term Definition
release-sync The mandatory main→dev sync PR after each squash-release; its branch is sync/main-to-dev-after-vN.N.N.
Ticket-ID exemption Branches whose name encodes no tracker ID because the work is the ticket (release-cut, release-sync) skip the branch-ticket-ID validator rule.
Exemption alternation The grep -E pattern in the hook that lists branch shapes allowed to skip the ticket-ID requirement.

validate-pr-create.sh only exempted release-cut branches (release/vN.N.N)
from the branch-ticket-ID requirement; sync/main-to-dev-after-vN.N.N
branches produced by /release-sync were rejected with "missing ticket ID",
even though apexyard#458 and the /release-sync skill document them as
exempt (the release being synced is the ticket). Mirrors the sibling
exemption in validate-branch-name.sh.

Adds the sync-branch pattern to the existing exemption alternation. The
PR-title check already accepts the sync(#N): shape; only the branch path
was wrong.

Closes #545
@atlas-apex atlas-apex merged commit f2ed536 into dev Jun 6, 2026
8 checks passed
@atlas-apex atlas-apex deleted the ci/GH-545-sync-pr-exemption branch June 6, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants