github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/services/pull_request/github_app.go (about) 1 package pull_request 2 3 import ( 4 "net/http" 5 6 "github.com/argoproj/argo-cd/v3/applicationset/services/github_app_auth" 7 "github.com/argoproj/argo-cd/v3/applicationset/services/internal/github_app" 8 appsetutils "github.com/argoproj/argo-cd/v3/applicationset/utils" 9 ) 10 11 func NewGithubAppService(g github_app_auth.Authentication, url, owner, repo string, labels []string, optionalHTTPClient ...*http.Client) (PullRequestService, error) { 12 httpClient := appsetutils.GetOptionalHTTPClient(optionalHTTPClient...) 13 client, err := github_app.Client(g, url, httpClient) 14 if err != nil { 15 return nil, err 16 } 17 return &GithubService{ 18 client: client, 19 owner: owner, 20 repo: repo, 21 labels: labels, 22 }, nil 23 }