Files
gstack/bin
Garry Tan 94f884dc36 feat: add bin/gstack-pr-title-rewrite.sh shared helper
Single source of truth for "rewrite a PR title to start with v<VERSION>".
Three cases: already correct (no-op), different prefix (replace), no prefix
(prepend). Rejects malformed VERSION (anything outside ^[0-9]+(\.[0-9]+)*$)
with exit code 2. Uses literal case prefix match instead of bash's pattern-
matching # operator so a VERSION with glob metacharacters cannot mismatch.

Free bun test covers the four branches plus malformed-input rejection,
plain-words-not-stripped, single-segment-not-stripped, idempotence, and
missing-args. 9 tests, ~400ms.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:05:40 -07:00
..