Extend the user agent and fix the build version for the listener app (#2892)

This commit is contained in:
Nikola Jokic
2023-09-14 20:10:49 +02:00
committed by GitHub
parent ea2fb32e20
commit 07bff8aa1e
19 changed files with 186 additions and 94 deletions
+5 -8
View File
@@ -19,8 +19,7 @@ type multiClient struct {
mu sync.Mutex
clients map[ActionsClientKey]*Client
logger logr.Logger
userAgent string
logger logr.Logger
}
type GitHubAppAuth struct {
@@ -42,12 +41,11 @@ type ActionsClientKey struct {
Namespace string
}
func NewMultiClient(userAgent string, logger logr.Logger) MultiClient {
func NewMultiClient(logger logr.Logger) MultiClient {
return &multiClient{
mu: sync.Mutex{},
clients: make(map[ActionsClientKey]*Client),
logger: logger,
userAgent: userAgent,
mu: sync.Mutex{},
clients: make(map[ActionsClientKey]*Client),
logger: logger,
}
}
@@ -66,7 +64,6 @@ func (m *multiClient) GetClientFor(ctx context.Context, githubConfigURL string,
githubConfigURL,
&creds,
append([]ClientOption{
WithUserAgent(m.userAgent),
WithLogger(m.logger),
}, options...)...,
)