Simplify branch name generation to use first two words instead of truncating at 20 chars
This commit is contained in:
parent
d4a3053bd7
commit
c5f376d797
|
|
@ -75,9 +75,9 @@ function branchFromPrompt(text: string): string {
|
|||
.toLowerCase()
|
||||
.replace(/[^a-z0-9\s-]/g, "")
|
||||
.trim()
|
||||
.replace(/\s+/g, "-")
|
||||
.slice(0, 20)
|
||||
.replace(/-$/, "")
|
||||
.split(/\s+/)
|
||||
.slice(0, 2)
|
||||
.join("-")
|
||||
}
|
||||
|
||||
program
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user