Begin move to project/alias by unique ID

This commit is contained in:
2024-12-30 16:42:45 -05:00
parent 11a2ca434c
commit 70027a9880
7 changed files with 51 additions and 25 deletions

View File

@@ -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
}
}