NormalizeRepoName takes in the repo name the user inputted and normalizes it using the same logic as GitHub (GitHub.com/new)
(repoName string)
| 9 | |
| 10 | // NormalizeRepoName takes in the repo name the user inputted and normalizes it using the same logic as GitHub (GitHub.com/new) |
| 11 | func NormalizeRepoName(repoName string) string { |
| 12 | newName := invalidCharactersRE.ReplaceAllString(repoName, "-") |
| 13 | return strings.TrimSuffix(newName, ".git") |
| 14 | } |
no outgoing calls