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

@ -80,11 +80,12 @@ func CreateTestGithubCredentials(ctx context.Context, credsName string, db commo
Name: credsName,
Description: "Test creds",
AuthType: params.GithubAuthTypePAT,
Endpoint: endpoint.Name,
PAT: params.GithubPAT{
OAuth2Token: "test-token",
},
}
newCreds, err := db.CreateGithubCredentials(ctx, endpoint.Name, newCredsParams)
newCreds, err := db.CreateGithubCredentials(ctx, newCredsParams)
if err != nil {
s.Fatalf("failed to create database object (new-creds): %v", err)
}