Begin move to project/alias by unique ID
This commit is contained in:
7
internal/cache/projects.go
vendored
7
internal/cache/projects.go
vendored
@@ -4,8 +4,9 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
func (c *Cache) ProjectString(p *projects.Project) string {
|
||||
@@ -60,9 +61,9 @@ func (c *Cache) GetProjectByRemoteAndId(remote string, id int) *projects.Project
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Cache) GetProjectByID(id int) *projects.Project {
|
||||
func (c *Cache) GetProjectByID(id string) *projects.Project {
|
||||
for _, p := range c.Projects {
|
||||
if p.ID == id {
|
||||
if p.GetID() == id {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user