6
6
"fmt"
7
7
"github.com/bradleyfalzon/ghinstallation/v2"
8
8
"github.com/diggerhq/digger/backend/models"
9
- github3 "github.com/diggerhq/digger/ee/ backend/providers/github "
9
+ "github.com/diggerhq/digger/backend/utils "
10
10
github2 "github.com/diggerhq/digger/libs/ci/github"
11
11
dg_configuration "github.com/diggerhq/digger/libs/digger_config"
12
12
utils2 "github.com/diggerhq/digger/libs/git_utils"
@@ -19,7 +19,7 @@ import (
19
19
"path"
20
20
)
21
21
22
- func GetGithubClient (gh github3. DiggerGithubEEClientProvider , installationId int64 , repoFullName string ) (* github.Client , * string , error ) {
22
+ func GetGithubClient (gh utils. GithubClientProvider , installationId int64 , repoFullName string ) (* github.Client , * string , error ) {
23
23
slog .Debug ("Getting GitHub client" ,
24
24
"installationId" , installationId ,
25
25
"repoFullName" , repoFullName )
@@ -33,7 +33,7 @@ func GetGithubClient(gh github3.DiggerGithubEEClientProvider, installationId int
33
33
return ghClient , token , err
34
34
}
35
35
36
- func GetGithubService (gh github3. DiggerGithubEEClientProvider , installationId int64 , repoFullName string , repoOwner string , repoName string ) (* github2.GithubService , * string , error ) {
36
+ func GetGithubService (gh utils. GithubClientProvider , installationId int64 , repoFullName string , repoOwner string , repoName string ) (* github2.GithubService , * string , error ) {
37
37
slog .Debug ("getting github client" , "installationId" , installationId , "repoFullName" , repoFullName )
38
38
ghClient , token , err := GetGithubClient (gh , installationId , repoFullName )
39
39
if err != nil {
@@ -94,7 +94,7 @@ func (gh DiggerGithubRealClientProvider) Get(githubAppId int64, installationId i
94
94
return ghClient , & token , nil
95
95
}
96
96
97
- func GetDiggerConfigForBranch (gh github3. DiggerGithubEEClientProvider , installationId int64 , repoFullName string , repoOwner string , repoName string , cloneUrl string , branch string ) (string , * github2.GithubService , * dg_configuration.DiggerConfig , graph.Graph [string , dg_configuration.Project ], error ) {
97
+ func GetDiggerConfigForBranch (gh utils. GithubClientProvider , installationId int64 , repoFullName string , repoOwner string , repoName string , cloneUrl string , branch string ) (string , * github2.GithubService , * dg_configuration.DiggerConfig , graph.Graph [string , dg_configuration.Project ], error ) {
98
98
ghService , token , err := GetGithubService (gh , installationId , repoFullName , repoOwner , repoName )
99
99
if err != nil {
100
100
log .Printf ("Error getting github service: %v" , err )
0 commit comments