diff options
author | Michael Muré <batolettre@gmail.com> | 2019-01-20 15:41:27 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:22 +0100 |
commit | 14b240af8fef269d2c1d5dde2fff192b656c50f3 (patch) | |
tree | 4f6ea032789d811cd019bbb6c190c99a650084b2 /cache/bug_excerpt.go | |
parent | d10c76469d40f13e27739fd363145e89bf74c3e0 (diff) | |
download | git-bug-14b240af8fef269d2c1d5dde2fff192b656c50f3.tar.gz |
identity: more cleaning and fixes after a code review
Diffstat (limited to 'cache/bug_excerpt.go')
-rw-r--r-- | cache/bug_excerpt.go | 18 |
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(), } } |