mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-05 18:13:38 +02:00
Allow use of client id as an app id (#4057)
This commit is contained in:
@@ -23,7 +23,8 @@ type multiClient struct {
|
||||
}
|
||||
|
||||
type GitHubAppAuth struct {
|
||||
AppID int64
|
||||
// AppID is the ID or the Client ID of the application
|
||||
AppID string
|
||||
AppInstallationID int64
|
||||
AppPrivateKey string
|
||||
}
|
||||
@@ -124,16 +125,11 @@ func (m *multiClient) GetClientFromSecret(ctx context.Context, githubConfigURL,
|
||||
return m.GetClientFor(ctx, githubConfigURL, auth, namespace, options...)
|
||||
}
|
||||
|
||||
parsedAppID, err := strconv.ParseInt(appID, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parsedAppInstallationID, err := strconv.ParseInt(appInstallationID, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
auth.AppCreds = &GitHubAppAuth{AppID: parsedAppID, AppInstallationID: parsedAppInstallationID, AppPrivateKey: appPrivateKey}
|
||||
auth.AppCreds = &GitHubAppAuth{AppID: appID, AppInstallationID: parsedAppInstallationID, AppPrivateKey: appPrivateKey}
|
||||
return m.GetClientFor(ctx, githubConfigURL, auth, namespace, options...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user