Update scripts/powershell/create-new-feature.ps1

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Den Delimarsky
2025-11-07 11:22:10 -08:00
committed by GitHub
parent a26ee578ae
commit e20d79e78b

View File

@@ -97,6 +97,9 @@ try {
if ($LASTEXITCODE -eq 0) {
foreach ($branch in $branches) {
# Clean branch name: remove leading markers and remote prefixes
# The following regex removes:
# - Git's current branch marker ('*') and leading whitespace (e.g., '* main')
# - Remote prefixes (e.g., 'remotes/origin/')
$cleanBranch = $branch.Trim() -replace '^\*?\s+', '' -replace '^remotes/[^/]+/', ''
# Extract feature number if branch matches pattern ###-*