diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-15 13:15:00 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-15 13:15:00 +0200 |
commit | 7bec0b1f134d213e7505fc2ac03ffea26f2193cc (patch) | |
tree | e263cccd84406843eacbc6bd184acdacb25a49d1 /misc | |
parent | b478cd1bcb4756b20f7f4b15fcf81f23e1a60a02 (diff) | |
download | git-bug-7bec0b1f134d213e7505fc2ac03ffea26f2193cc.tar.gz |
bug: add a data validation process to avoid merging incorrect operations
Diffstat (limited to 'misc')
-rw-r--r-- | misc/random_bugs/create_random_bugs.go | 18 |
1 files changed, 13 insertions, 5 deletions
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) } |