Merged alias fuzzy search
This commit is contained in:
@ -2,6 +2,8 @@ package projects
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/gitlab"
|
||||
"golang.org/x/exp/slices"
|
||||
@ -61,3 +63,12 @@ func (c *Cache) GetProjectAliasStrings(project *gitlab.Project) []string {
|
||||
}
|
||||
return strings
|
||||
}
|
||||
|
||||
func (c *Cache) GetProjectStringWithAliases(project *gitlab.Project) string {
|
||||
aliases := c.GetProjectAliasStrings(project)
|
||||
return fmt.Sprintf("%s (%s) -> %s",
|
||||
project.Name,
|
||||
strings.Join(aliases, ", "),
|
||||
project.PathWithNamespace,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user