aboutsummaryrefslogtreecommitdiffstats
path: root/commands/cmdjson/bug.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 /commands/cmdjson/bug.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 'commands/cmdjson/bug.go')
-rw-r--r--commands/cmdjson/bug.go35
1 files changed, 18 insertions, 17 deletions
diff --git a/commands/cmdjson/bug.go b/commands/cmdjson/bug.go
index a7f894ed..62eae92b 100644
--- a/commands/cmdjson/bug.go
+++ b/commands/cmdjson/bug.go
@@ -3,20 +3,21 @@ package cmdjson
import (
"github.com/git-bug/git-bug/cache"
"github.com/git-bug/git-bug/entities/bug"
+ "github.com/git-bug/git-bug/entities/common"
)
type BugSnapshot struct {
- Id string `json:"id"`
- HumanId string `json:"human_id"`
- CreateTime Time `json:"create_time"`
- EditTime Time `json:"edit_time"`
- Status string `json:"status"`
- Labels []bug.Label `json:"labels"`
- Title string `json:"title"`
- Author Identity `json:"author"`
- Actors []Identity `json:"actors"`
- Participants []Identity `json:"participants"`
- Comments []BugComment `json:"comments"`
+ Id string `json:"id"`
+ HumanId string `json:"human_id"`
+ CreateTime Time `json:"create_time"`
+ EditTime Time `json:"edit_time"`
+ Status string `json:"status"`
+ Labels []common.Label `json:"labels"`
+ Title string `json:"title"`
+ Author Identity `json:"author"`
+ Actors []Identity `json:"actors"`
+ Participants []Identity `json:"participants"`
+ Comments []BugComment `json:"comments"`
}
func NewBugSnapshot(snap *bug.Snapshot) BugSnapshot {
@@ -71,12 +72,12 @@ type BugExcerpt struct {
CreateTime Time `json:"create_time"`
EditTime Time `json:"edit_time"`
- Status string `json:"status"`
- Labels []bug.Label `json:"labels"`
- Title string `json:"title"`
- Actors []Identity `json:"actors"`
- Participants []Identity `json:"participants"`
- Author Identity `json:"author"`
+ Status string `json:"status"`
+ Labels []common.Label `json:"labels"`
+ Title string `json:"title"`
+ Actors []Identity `json:"actors"`
+ Participants []Identity `json:"participants"`
+ Author Identity `json:"author"`
Comments int `json:"comments"`
Metadata map[string]string `json:"metadata"`