diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-13 12:20:28 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-13 12:20:28 +0200 |
commit | f569e6aacc0690e7b1bebf33a10a8e0d154937df (patch) | |
tree | c17ac2201b7abbc6889137d968c8450dc3099f9a /misc/random_bugs | |
parent | 8a25c63d6972d9168dcb3599066076bdb84f8790 (diff) | |
download | git-bug-f569e6aacc0690e7b1bebf33a10a8e0d154937df.tar.gz |
operations: return a more convenient array of result for label changes
Diffstat (limited to 'misc/random_bugs')
-rw-r--r-- | misc/random_bugs/create_random_bugs.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go index 14c2b26f..ad81e2ab 100644 --- a/misc/random_bugs/create_random_bugs.go +++ b/misc/random_bugs/create_random_bugs.go @@ -165,6 +165,7 @@ func labels(b bug.Interface, p bug.Person) { removed = append(removed, addedLabels[index]) addedLabels[index] = addedLabels[len(addedLabels)-1] addedLabels = addedLabels[:len(addedLabels)-1] + nbRemoved-- } var added []string @@ -175,5 +176,8 @@ func labels(b bug.Interface, p bug.Person) { addedLabels = append(addedLabels, label) } - operations.ChangeLabels(nil, b, p, added, removed) + // ignore error + // if the randomisation produce no changes, no op + // is added to the bug + operations.ChangeLabels(b, p, added, removed) } |