Skip to content

Commit

Permalink
fix: Trimming space when sanitizing name of repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Sep 19, 2020
1 parent bb7d769 commit 1a1c422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/service/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ func (a app) check(ctx context.Context, old, new model.Repository) error {
func sanitizeName(name string) string {
matches := nameMatcher.FindStringSubmatch(name)
if len(matches) > 0 {
return matches[len(matches)-1]
return strings.TrimSpace(matches[len(matches)-1])
}

return name
return strings.TrimSpace(name)
}

0 comments on commit 1a1c422

Please sign in to comment.