mirror of
https://github.com/github/spec-kit.git
synced 2026-01-30 12:42:02 +00:00
Update scripts/powershell/create-new-feature.ps1
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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 ###-*
|
||||
|
||||
Reference in New Issue
Block a user