Move branchRepository initialization next to other repositories
@@ -117,6 +117,8 @@ func main() {
repositoryRepository := db.NewRepositoryRepository(database)
fetchRepository := db.NewFetchRepository(database)
credentialRepository := db.NewCredentialRepository(database)
+ branchRepository := db.NewBranchRepository(database)
+
emitter := metrics.BuildEmitter(cfg.Metrics.DatadogAPIKey, cfg.Metrics.Environment)
gitClient := gitclient.New(cfg.GitHub.PrivateKeyPath, cfg.GitHub.PublicKeyPath)
repoWhitelist := notifications.BuildWhitelist(cfg.Whitelist...)
@@ -227,8 +229,6 @@ func main() {
emitter,
)
- branchRepository := db.NewBranchRepository(database)
-
headCredentialCounter := revok.NewHeadCredentialCounter(
logger,
branchRepository,
