aboutsummaryrefslogtreecommitdiffstats
path: root/cache/bug_excerpt.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/bug_excerpt.go')
-rw-r--r--cache/bug_excerpt.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go
index f5844b64..daf89c4f 100644
--- a/cache/bug_excerpt.go
+++ b/cache/bug_excerpt.go
@@ -3,8 +3,6 @@ package cache
import (
"encoding/gob"
- "github.com/MichaelMure/git-bug/identity"
-
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/util/lamport"
)
@@ -20,12 +18,17 @@ type BugExcerpt struct {
EditUnixTime int64
Status bug.Status
- Author identity.Interface
+ Author AuthorExcerpt
Labels []bug.Label
CreateMetadata map[string]string
}
+type AuthorExcerpt struct {
+ Name string
+ Login string
+}
+
func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt {
return &BugExcerpt{
Id: b.Id(),
@@ -34,9 +37,12 @@ func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt {
CreateUnixTime: b.FirstOp().GetUnixTime(),
EditUnixTime: snap.LastEditUnix(),
Status: snap.Status,
- Author: snap.Author,
- Labels: snap.Labels,
- CreateMetadata: b.FirstOp().AllMetadata(),
+ Author: AuthorExcerpt{
+ Login: snap.Author.Login(),
+ Name: snap.Author.Name(),
+ },
+ Labels: snap.Labels,
+ CreateMetadata: b.FirstOp().AllMetadata(),
}
}