From e5a6a71b78b0d8c5ef0d52c3eeb279d5738b9cf7 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 1 Aug 2018 21:57:12 +0200 Subject: graphql: implement the missing mutations --- bug/operations/label_change.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bug') diff --git a/bug/operations/label_change.go b/bug/operations/label_change.go index 568e132e..a711faef 100644 --- a/bug/operations/label_change.go +++ b/bug/operations/label_change.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/MichaelMure/git-bug/bug" "io" + "io/ioutil" "sort" ) @@ -61,6 +62,10 @@ func NewLabelChangeOperation(author bug.Person, added, removed []bug.Label) Labe func ChangeLabels(out io.Writer, b *bug.Bug, author bug.Person, add, remove []string) error { var added, removed []bug.Label + if out == nil { + out = ioutil.Discard + } + snap := b.Compile() for _, str := range add { -- cgit