From 7bec0b1f134d213e7505fc2ac03ffea26f2193cc Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 15 Sep 2018 13:15:00 +0200 Subject: bug: add a data validation process to avoid merging incorrect operations --- misc/random_bugs/create_random_bugs.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'misc/random_bugs') diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go index ad81e2ab..75ce5f82 100644 --- a/misc/random_bugs/create_random_bugs.go +++ b/misc/random_bugs/create_random_bugs.go @@ -57,8 +57,8 @@ func GenerateRandomBugsWithSeed(opts Options, seed int64) []*bug.Bug { comment, title, labels, - operations.Open, - operations.Close, + open, + close, } result := make([]*bug.Bug, opts.BugNumber) @@ -148,11 +148,19 @@ func paragraphs() string { } func comment(b bug.Interface, p bug.Person) { - operations.Comment(b, p, paragraphs()) + _ = operations.Comment(b, p, paragraphs()) } func title(b bug.Interface, p bug.Person) { - operations.SetTitle(b, p, fake.Sentence()) + _ = operations.SetTitle(b, p, fake.Sentence()) +} + +func open(b bug.Interface, p bug.Person) { + _ = operations.Open(b, p) +} + +func close(b bug.Interface, p bug.Person) { + _ = operations.Close(b, p) } var addedLabels []string @@ -179,5 +187,5 @@ func labels(b bug.Interface, p bug.Person) { // ignore error // if the randomisation produce no changes, no op // is added to the bug - operations.ChangeLabels(b, p, added, removed) + _, _ = operations.ChangeLabels(b, p, added, removed) } -- cgit