From feab9412dffe5772048aad29893c4cb01d566387 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 21 Nov 2018 18:56:12 +0100 Subject: WIP identity in git --- termui/bug_table.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'termui/bug_table.go') diff --git a/termui/bug_table.go b/termui/bug_table.go index 13d86aa7..ba946c86 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -6,6 +6,7 @@ import ( "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" + "github.com/MichaelMure/git-bug/identity" "github.com/MichaelMure/git-bug/util/colors" "github.com/MichaelMure/git-bug/util/text" "github.com/MichaelMure/gocui" @@ -289,7 +290,7 @@ func (bt *bugTable) render(v *gocui.View, maxX int) { columnWidths := bt.getColumnWidths(maxX) for _, b := range bt.bugs { - person := bug.Person{} + person := &identity.Identity{} snap := b.Snapshot() if len(snap.Comments) > 0 { create := snap.Comments[0] -- cgit From bdbe9e7e8256fff820efe1ce707e7154d517ecb3 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 17 Jan 2019 03:09:08 +0100 Subject: identity: more progress and fixes --- termui/bug_table.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'termui/bug_table.go') diff --git a/termui/bug_table.go b/termui/bug_table.go index ba946c86..69634151 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -6,7 +6,6 @@ import ( "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" - "github.com/MichaelMure/git-bug/identity" "github.com/MichaelMure/git-bug/util/colors" "github.com/MichaelMure/git-bug/util/text" "github.com/MichaelMure/gocui" @@ -290,12 +289,9 @@ func (bt *bugTable) render(v *gocui.View, maxX int) { columnWidths := bt.getColumnWidths(maxX) for _, b := range bt.bugs { - person := &identity.Identity{} snap := b.Snapshot() - if len(snap.Comments) > 0 { - create := snap.Comments[0] - person = create.Author - } + create := snap.Comments[0] + authorIdentity := create.Author summaryTxt := fmt.Sprintf("C:%-2d L:%-2d", len(snap.Comments)-1, @@ -305,7 +301,7 @@ func (bt *bugTable) render(v *gocui.View, maxX int) { id := text.LeftPadMaxLine(snap.HumanId(), columnWidths["id"], 1) status := text.LeftPadMaxLine(snap.Status.String(), columnWidths["status"], 1) title := text.LeftPadMaxLine(snap.Title, columnWidths["title"], 1) - author := text.LeftPadMaxLine(person.DisplayName(), columnWidths["author"], 1) + author := text.LeftPadMaxLine(authorIdentity.DisplayName(), columnWidths["author"], 1) summary := text.LeftPadMaxLine(summaryTxt, columnWidths["summary"], 1) lastEdit := text.LeftPadMaxLine(humanize.Time(snap.LastEditTime()), columnWidths["lastEdit"], 1) -- cgit