aboutsummaryrefslogtreecommitdiffstats
path: root/misc/random_bugs/cmd/main.go
blob: 9a24bbb498f986f38c49229a946893cbbca0b260 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main

import (
	"os"

	"github.com/git-bug/git-bug/entities/bug"
	rb "github.com/git-bug/git-bug/misc/random_bugs"
	"github.com/git-bug/git-bug/repository"
)

// This program will randomly generate a collection of bugs in the repository
// of the current path
func main() {
	const gitBugNamespace = "git-bug"

	dir, err := os.Getwd()
	if err != nil {
		panic(err)
	}

	loaders := []repository.ClockLoader{
		bug.ClockLoader,
	}

	repo, err := repository.OpenGoGitRepo(dir, gitBugNamespace, loaders)
	if err != nil {
		panic(err)
	}

	rb.CommitRandomBugs(repo, rb.DefaultOptions())
}