aboutsummaryrefslogtreecommitdiffstats
path: root/cache/bug_subcache.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2024-08-25 20:40:23 +0200
committerGitHub <noreply@github.com>2024-08-25 18:40:23 +0000
commit3a4b8805dfd794cc25f57e99c73ddec651805af1 (patch)
treeb6af67c761c96b323400d061db22ceed73fb0bb0 /cache/bug_subcache.go
parentc3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff)
downloadgit-bug-3a4b8805dfd794cc25f57e99c73ddec651805af1.tar.gz
core: make label a common type, in a similar fashion as for status (#1252)
This will be useful for Board, and likely code review support later
Diffstat (limited to 'cache/bug_subcache.go')
-rw-r--r--cache/bug_subcache.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cache/bug_subcache.go b/cache/bug_subcache.go
index a1f4498a..09d7cbba 100644
--- a/cache/bug_subcache.go
+++ b/cache/bug_subcache.go
@@ -6,6 +6,7 @@ import (
"time"
"github.com/git-bug/git-bug/entities/bug"
+ "github.com/git-bug/git-bug/entities/common"
"github.com/git-bug/git-bug/entities/identity"
"github.com/git-bug/git-bug/entity"
"github.com/git-bug/git-bug/query"
@@ -187,11 +188,11 @@ func (c *RepoCacheBug) Query(q *query.Query) ([]entity.Id, error) {
// Note: in the future, a proper label policy could be implemented where valid
// labels are defined in a configuration file. Until that, the default behavior
// is to return the list of labels already used.
-func (c *RepoCacheBug) ValidLabels() []bug.Label {
+func (c *RepoCacheBug) ValidLabels() []common.Label {
c.mu.RLock()
defer c.mu.RUnlock()
- set := map[bug.Label]interface{}{}
+ set := map[common.Label]interface{}{}
for _, excerpt := range c.excerpts {
for _, l := range excerpt.Labels {
@@ -199,7 +200,7 @@ func (c *RepoCacheBug) ValidLabels() []bug.Label {
}
}
- result := make([]bug.Label, len(set))
+ result := make([]common.Label, len(set))
i := 0
for l := range set {