Rename GitHub specific types
This change renames a lot of variables, types and functions to be more generic. The goal is to allow GARM to add more forges in the future. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
4890eb4732
commit
40e6581a75
72 changed files with 896 additions and 700 deletions
|
|
@ -85,7 +85,7 @@ func CreateGARMTestUser(ctx context.Context, username string, db common.Store, s
|
|||
return user
|
||||
}
|
||||
|
||||
func CreateDefaultGithubEndpoint(ctx context.Context, db common.Store, s *testing.T) params.GithubEndpoint {
|
||||
func CreateDefaultGithubEndpoint(ctx context.Context, db common.Store, s *testing.T) params.ForgeEndpoint {
|
||||
endpointParams := params.CreateGithubEndpointParams{
|
||||
Name: "github.com",
|
||||
Description: "github endpoint",
|
||||
|
|
@ -110,11 +110,11 @@ func CreateDefaultGithubEndpoint(ctx context.Context, db common.Store, s *testin
|
|||
return ep
|
||||
}
|
||||
|
||||
func CreateTestGithubCredentials(ctx context.Context, credsName string, db common.Store, s *testing.T, endpoint params.GithubEndpoint) params.GithubCredentials {
|
||||
func CreateTestGithubCredentials(ctx context.Context, credsName string, db common.Store, s *testing.T, endpoint params.ForgeEndpoint) params.GithubCredentials {
|
||||
newCredsParams := params.CreateGithubCredentialsParams{
|
||||
Name: credsName,
|
||||
Description: "Test creds",
|
||||
AuthType: params.GithubAuthTypePAT,
|
||||
AuthType: params.ForgeAuthTypePAT,
|
||||
Endpoint: endpoint.Name,
|
||||
PAT: params.GithubPAT{
|
||||
OAuth2Token: "test-token",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue