diff options
Diffstat (limited to 'cache/bug_cache.go')
-rw-r--r-- | cache/bug_cache.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go index cbb0d15a..67c16e96 100644 --- a/cache/bug_cache.go +++ b/cache/bug_cache.go @@ -1,8 +1,6 @@ package cache import ( - "io" - "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/operations" "github.com/MichaelMure/git-bug/util/git" @@ -51,18 +49,23 @@ func (c *BugCache) AddCommentWithFiles(message string, files []git.Hash) error { return c.notifyUpdated() } -func (c *BugCache) ChangeLabels(out io.Writer, added []string, removed []string) error { +func (c *BugCache) ChangeLabels(added []string, removed []string) ([]operations.LabelChangeResult, error) { author, err := bug.GetUser(c.repoCache.repo) if err != nil { - return err + return nil, err } - err = operations.ChangeLabels(out, c.bug, author, added, removed) + changes, err := operations.ChangeLabels(c.bug, author, added, removed) if err != nil { - return err + return changes, err } - return c.notifyUpdated() + err = c.notifyUpdated() + if err != nil { + return nil, err + } + + return changes, nil } func (c *BugCache) Open() error { |