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()
|
.toLowerCase()
|
||||||
.replace(/[^a-z0-9\s-]/g, "")
|
.replace(/[^a-z0-9\s-]/g, "")
|
||||||
.trim()
|
.trim()
|
||||||
.replace(/\s+/g, "-")
|
.split(/\s+/)
|
||||||
.slice(0, 20)
|
.slice(0, 2)
|
||||||
.replace(/-$/, "")
|
.join("-")
|
||||||
}
|
}
|
||||||
|
|
||||||
program
|
program
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user