Add github credentials API and cli code

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2024-04-19 08:47:44 +00:00
parent 77ecb16166
commit eadbe784b9
28 changed files with 2364 additions and 175 deletions

View file

@ -297,6 +297,7 @@ func (s *sqlDatabase) migrateCredentialsToDB() (err error) {
credParams := params.CreateGithubCredentialsParams{
Name: cred.Name,
Description: cred.Description,
Endpoint: endpoint.Name,
AuthType: params.GithubAuthType(cred.GetAuthType()),
}
switch credParams.AuthType {
@ -327,7 +328,7 @@ func (s *sqlDatabase) migrateCredentialsToDB() (err error) {
}
}
creds, err := s.CreateGithubCredentials(adminCtx, endpoint.Name, credParams)
creds, err := s.CreateGithubCredentials(adminCtx, credParams)
if err != nil {
return errors.Wrap(err, "creating github credentials")
}