aboutsummaryrefslogtreecommitdiffstats
path: root/misc/random_bugs
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-15 13:15:00 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-15 13:15:00 +0200
commit7bec0b1f134d213e7505fc2ac03ffea26f2193cc (patch)
treee263cccd84406843eacbc6bd184acdacb25a49d1 /misc/random_bugs
parentb478cd1bcb4756b20f7f4b15fcf81f23e1a60a02 (diff)
downloadgit-bug-7bec0b1f134d213e7505fc2ac03ffea26f2193cc.tar.gz
bug: add a data validation process to avoid merging incorrect operations
Diffstat (limited to 'misc/random_bugs')
-rw-r--r--misc/random_bugs/create_random_bugs.go18
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)
}