drone/internal/services/pullreq/wire.go
Enver Bisevac 13a456e357 [scm-58] Add merge-check and Integrate with PR (#318)
Co-authored-by: Johannes Batzill <johannes.batzill@harness.io>
2023-02-11 23:22:12 -08:00

43 lines
1.3 KiB
Go

// Copyright 2022 Harness Inc. All rights reserved.
// Use of this source code is governed by the Polyform Free Trial License
// that can be found in the LICENSE.md file for this repository.
package pullreq
import (
"context"
"github.com/harness/gitness/events"
"github.com/harness/gitness/gitrpc"
gitevents "github.com/harness/gitness/internal/events/git"
pullreqevents "github.com/harness/gitness/internal/events/pullreq"
"github.com/harness/gitness/internal/store"
"github.com/harness/gitness/pubsub"
"github.com/harness/gitness/types"
"github.com/google/wire"
"github.com/jmoiron/sqlx"
)
var WireSet = wire.NewSet(
ProvideService,
)
func ProvideService(ctx context.Context,
config *types.Config,
gitReaderFactory *events.ReaderFactory[*gitevents.Reader],
pullReqEvFactory *events.ReaderFactory[*pullreqevents.Reader],
pullReqEvReporter *pullreqevents.Reporter,
gitRPCClient gitrpc.Interface,
db *sqlx.DB,
repoGitInfoCache store.RepoGitInfoCache,
principalCache store.PrincipalInfoCache,
repoStore store.RepoStore,
pullreqStore store.PullReqStore,
activityStore store.PullReqActivityStore,
pubsub pubsub.PubSub,
) (*Service, error) {
return New(ctx, config, gitReaderFactory, pullReqEvFactory, pullReqEvReporter, gitRPCClient,
db, repoGitInfoCache, principalCache, repoStore, pullreqStore, activityStore, pubsub)
}