ci(#545): exempt sync/ branches from the PR-create ticket-ID rule#546
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sync/main-to-dev-after-vN.N.Nbranches from the branch-ticket-ID rule invalidate-pr-create.sh— these/release-syncbranches carry no ticket ID by design (the release being synced is the ticket), exactly like therelease/vN.N.Nbranches the hook already exempts. Without this, every post-release sync PR is blocked withmissing ticket ID.|^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 thesync(#N):shape; only the branch path was wrong.validate-branch-name.shwhitelists thesynctype ([Chore] /release-sync — reconcile sync type with branch/commit/PR whitelists #458) and the/release-syncskill 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
bash bin/run-hook-tests.sh→ green (no regression in the hook suite).sync/main-to-dev-after-v3.0.0now passes the branch-ticket-ID check;release/v3.0.0still passes; a genuinely malformed branch (e.g.foo-bar) is still rejected.shellcheck --severity=warning .claude/hooks/validate-pr-create.sh→ clean.Closes #545
Glossary
sync/main-to-dev-after-vN.N.N.grep -Epattern in the hook that lists branch shapes allowed to skip the ticket-ID requirement.