Move from --gitlab flags to global --remote flags

This commit is contained in:
2024-01-17 10:06:20 -05:00
parent f33199bd7b
commit 702f599f5f
19 changed files with 152 additions and 121 deletions

View File

@@ -71,9 +71,9 @@ func (c *Cache) AliasStrings(prefix string) []string {
return aliases
}
func (c *Cache) GetAliasByName(name string, gitlabs ...string) *ProjectAlias {
func (c *Cache) GetAliasByName(name string, remotes ...string) *ProjectAlias {
for _, a := range c.Aliases {
if len(gitlabs) > 0 && !slices.Contains(gitlabs, a.Remote) {
if len(remotes) > 0 && !slices.Contains(remotes, a.Remote) {
continue
}
if name == a.Alias {