summaryrefslogtreecommitdiffstatshomepage
path: root/misc
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-14 16:58:06 +0200
committerMichael Muré <batolettre@gmail.com>2023-08-14 16:58:06 +0200
commit297e1931a7b5913275e8e9b0a46494d95e7e5e7c (patch)
tree5c5ef10f66bff4f9e6e3bbe87c70c02940bdbce3 /misc
parentf0167a1d6068d22af5ffff260e2848f7c14a71b3 (diff)
downloadgit-bug-bootstrap-rework-2.tar.gz
git-bug-bootstrap-rework-2.zip
Diffstat (limited to 'misc')
-rw-r--r--misc/random_bugs/create_random_bugs.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go
index 7e94b61a..e88e1054 100644
--- a/misc/random_bugs/create_random_bugs.go
+++ b/misc/random_bugs/create_random_bugs.go
@@ -9,10 +9,11 @@ import (
"github.com/MichaelMure/git-bug/entities/bug"
"github.com/MichaelMure/git-bug/entities/identity"
+ "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/repository"
)
-type opsGenerator func(bug.Interface, identity.Interface, int64)
+type opsGenerator func(bug.Interface, entity.Identity, int64)
type Options struct {
BugNumber int
@@ -133,7 +134,7 @@ func generateRandomPersons(repo repository.ClockedRepo, n int) {
}
}
-func randomPerson() identity.Interface {
+func randomPerson() entity.Identity {
index := rand.Intn(len(persons))
return persons[index]
}
@@ -143,25 +144,25 @@ func paragraphs() string {
return strings.Replace(p, "\t", "\n\n", -1)
}
-func comment(b bug.Interface, p identity.Interface, timestamp int64) {
+func comment(b bug.Interface, p entity.Identity, timestamp int64) {
_, _, _ = bug.AddComment(b, p, timestamp, paragraphs(), nil, nil)
}
-func title(b bug.Interface, p identity.Interface, timestamp int64) {
+func title(b bug.Interface, p entity.Identity, timestamp int64) {
_, _ = bug.SetTitle(b, p, timestamp, fake.Sentence(), nil)
}
-func open(b bug.Interface, p identity.Interface, timestamp int64) {
+func open(b bug.Interface, p entity.Identity, timestamp int64) {
_, _ = bug.Open(b, p, timestamp, nil)
}
-func close(b bug.Interface, p identity.Interface, timestamp int64) {
+func close(b bug.Interface, p entity.Identity, timestamp int64) {
_, _ = bug.Close(b, p, timestamp, nil)
}
var addedLabels []string
-func labels(b bug.Interface, p identity.Interface, timestamp int64) {
+func labels(b bug.Interface, p entity.Identity, timestamp int64) {
var removed []string
nbRemoved := rand.Intn(3)
for nbRemoved > 0 && len(addedLabels) > 0 {