diff options
author | Michael Muré <batolettre@gmail.com> | 2024-08-25 20:40:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 18:40:23 +0000 |
commit | 3a4b8805dfd794cc25f57e99c73ddec651805af1 (patch) | |
tree | b6af67c761c96b323400d061db22ceed73fb0bb0 /commands/bug/completion.go | |
parent | c3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff) | |
download | git-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 'commands/bug/completion.go')
-rw-r--r-- | commands/bug/completion.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/commands/bug/completion.go b/commands/bug/completion.go index d313ef37..4329829e 100644 --- a/commands/bug/completion.go +++ b/commands/bug/completion.go @@ -9,7 +9,7 @@ import ( "github.com/git-bug/git-bug/commands/completion" "github.com/git-bug/git-bug/commands/execenv" _select "github.com/git-bug/git-bug/commands/select" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) // BugCompletion complete a bug id @@ -61,26 +61,26 @@ func BugAndLabelsCompletion(env *execenv.Env, addOrRemove bool) completion.Valid snap := b.Snapshot() - seenLabels := map[bug.Label]bool{} + seenLabels := map[common.Label]bool{} for _, label := range cleanArgs { - seenLabels[bug.Label(label)] = addOrRemove + seenLabels[common.Label(label)] = addOrRemove } - var labels []bug.Label + var labels []common.Label if addOrRemove { for _, label := range snap.Labels { seenLabels[label] = true } allLabels := env.Backend.Bugs().ValidLabels() - labels = make([]bug.Label, 0, len(allLabels)) + labels = make([]common.Label, 0, len(allLabels)) for _, label := range allLabels { if !seenLabels[label] { labels = append(labels, label) } } } else { - labels = make([]bug.Label, 0, len(snap.Labels)) + labels = make([]common.Label, 0, len(snap.Labels)) for _, label := range snap.Labels { if seenLabels[label] { labels = append(labels, label) |