fix(slug): replace slash in branch name instead of deleting it

Aligns gstack-slug with ship Step 8's tr '/' '-' so gstack-review-log and
gstack-review-read stop writing feat/foo to featfoo while other writers
use feat-foo. The [a-zA-Z0-9._-] invariant promised in the file header
still holds; tr -cd remains the final filter.

Refs #1127
This commit is contained in:
Shaked Eyal 2026-08-06 18:29:36 +03:00
parent a3259400a3
commit af9fe63b0c
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ if [[ -n "$SLUG" ]]; then
fi
RAW_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) || RAW_BRANCH=""
BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr -cd 'a-zA-Z0-9._-')
BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr '/' '-' | tr -cd 'a-zA-Z0-9._-')
BRANCH="${BRANCH:-unknown}"
echo "SLUG=$SLUG"
echo "BRANCH=$BRANCH"