mirror of
https://github.com/harness/drone.git
synced 2025-05-06 02:10:05 +08:00
40 lines
1.2 KiB
Go
40 lines
1.2 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/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,
|
|
repoStore store.RepoStore,
|
|
pullreqStore store.PullReqStore,
|
|
activityStore store.PullReqActivityStore,
|
|
) (*Service, error) {
|
|
return New(ctx, config, gitReaderFactory, pullReqEvFactory, pullReqEvReporter, gitRPCClient,
|
|
db, repoGitInfoCache, repoStore, pullreqStore, activityStore)
|
|
}
|