diff options
author | Michael Muré <batolettre@gmail.com> | 2019-05-27 21:14:55 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-05-27 21:14:55 +0200 |
commit | c7abac388aadd274d4f23f996a15f8bba90f2a92 (patch) | |
tree | ced1116de500346eb340f72b7bfc672136e40c1e /misc | |
parent | 9865dfcdf0810e288283f2ef4eba450041db32f9 (diff) | |
download | git-bug-c7abac388aadd274d4f23f996a15f8bba90f2a92.tar.gz |
repo: refactor how test repo are created/cleaned
Diffstat (limited to 'misc')
-rw-r--r-- | misc/random_bugs/create_random_bugs.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go index 0657c808..ea8833ee 100644 --- a/misc/random_bugs/create_random_bugs.go +++ b/misc/random_bugs/create_random_bugs.go @@ -29,6 +29,17 @@ func DefaultOptions() Options { } } +func FillRepo(repo repository.ClockedRepo, bugNumber int) { + FillRepoWithSeed(repo, bugNumber, time.Now().UnixNano()) +} + +func FillRepoWithSeed(repo repository.ClockedRepo, bugNumber int, seed int64) { + options := DefaultOptions() + options.BugNumber = bugNumber + + CommitRandomBugsWithSeed(repo, options, seed) +} + func CommitRandomBugs(repo repository.ClockedRepo, opts Options) { CommitRandomBugsWithSeed(repo, opts, time.Now().UnixNano()) } |