Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 2 additions & 27 deletions internal/domain/models/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,35 +67,18 @@ func (p *ProjectBase) Tags() []string {
}

if p.UID != "" {
// without prefix
tags = append(tags, p.UID)
// with prefix
tag := fmt.Sprintf("project_uid:%s", p.UID)
tags = append(tags, tag)
}

if p.ParentUID != "" {
// with prefix
tag := fmt.Sprintf("parent_uid:%s", p.ParentUID)
tags = append(tags, tag)
}

if p.Slug != "" {
// without prefix
tags = append(tags, p.Slug)
// with prefix
tag := fmt.Sprintf("project_slug:%s", p.Slug)
tags = append(tags, tag)
}

if p.Name != "" {
// without prefix
tags = append(tags, p.Name)
}

if p.Description != "" {
// without prefix
tags = append(tags, p.Description)
tag := fmt.Sprintf("project_name:%s", p.Name)
tags = append(tags, tag)
}

return tags
Expand All @@ -113,17 +96,9 @@ func (p *ProjectSettings) Tags() []string {
}

if p.UID != "" {
// without prefix
tags = append(tags, p.UID)
// with prefix
tag := fmt.Sprintf("project_uid:%s", p.UID)
tags = append(tags, tag)
}

if p.MissionStatement != "" {
// without prefix
tags = append(tags, p.MissionStatement)
}

return tags
}
Loading