Files
02c7b69415 feat: Add GitHub API rate limit metrics (#22864)
Signed-off-by: reggie-k <[email protected]>
Signed-off-by: Regina Voloshin <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
2025-06-17 01:41:38 +00:00

24 lines
700 B
Go

package pull_request
import (
"net/http"
"github.com/argoproj/argo-cd/v3/applicationset/services/github_app_auth"
"github.com/argoproj/argo-cd/v3/applicationset/services/internal/github_app"
appsetutils "github.com/argoproj/argo-cd/v3/applicationset/utils"
)
func NewGithubAppService(g github_app_auth.Authentication, url, owner, repo string, labels []string, optionalHTTPClient ...*http.Client) (PullRequestService, error) {
httpClient := appsetutils.GetOptionalHTTPClient(optionalHTTPClient...)
client, err := github_app.Client(g, url, httpClient)
if err != nil {
return nil, err
}
return &GithubService{
client: client,
owner: owner,
repo: repo,
labels: labels,
}, nil
}