aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-01 21:57:12 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-01 21:57:12 +0200
commite5a6a71b78b0d8c5ef0d52c3eeb279d5738b9cf7 (patch)
treeb61cfb5f121a6988aa811566c8cc04e4834c87b8 /bug
parent15f282421941b90e1f62912cf68b7556a8ce7b33 (diff)
downloadgit-bug-e5a6a71b78b0d8c5ef0d52c3eeb279d5738b9cf7.tar.gz
graphql: implement the missing mutations
Diffstat (limited to 'bug')
-rw-r--r--bug/operations/label_change.go5
1 files changed, 5 insertions, 0 deletions
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 {