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 /api/graphql/resolvers/label.go | |
parent | c3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff) | |
download | git-bug-3a4b8805dfd794cc25f57e99c73ddec651805af1.tar.gz git-bug-3a4b8805dfd794cc25f57e99c73ddec651805af1.zip |
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 'api/graphql/resolvers/label.go')
-rw-r--r-- | api/graphql/resolvers/label.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/graphql/resolvers/label.go b/api/graphql/resolvers/label.go index 8fe6c8e5..3e63b655 100644 --- a/api/graphql/resolvers/label.go +++ b/api/graphql/resolvers/label.go @@ -5,18 +5,18 @@ import ( "image/color" "github.com/git-bug/git-bug/api/graphql/graph" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) var _ graph.LabelResolver = &labelResolver{} type labelResolver struct{} -func (labelResolver) Name(ctx context.Context, obj *bug.Label) (string, error) { +func (labelResolver) Name(ctx context.Context, obj *common.Label) (string, error) { return obj.String(), nil } -func (labelResolver) Color(ctx context.Context, obj *bug.Label) (*color.RGBA, error) { +func (labelResolver) Color(ctx context.Context, obj *common.Label) (*color.RGBA, error) { rgba := obj.Color().RGBA() return &rgba, nil } |