Skip to content

Commit

Permalink
Merge pull request #52 from Scalr/fix/SCALRCORE-20952
Browse files Browse the repository at this point in the history
SCALRCORE-20952 API > Create VCS provider with personal token > Provider is broken
  • Loading branch information
penja committed Feb 7, 2022
2 parents 8cbac06 + eab908c commit 9f0b670
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vcs_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ type VcsProvider struct {
AuthType AuthType `jsonapi:"attr,auth-type"`
OAuth *OAuth `jsonapi:"attr,oauth"`
Token *string `jsonapi:"attr,token"`
Username *string `jsonapi:"attr,username"`

// Relations
Environments []*Environment `jsonapi:"relation,environments"`
Expand Down Expand Up @@ -122,6 +123,7 @@ type VcsProviderCreateOptions struct {
OAuth *OAuth `jsonapi:"attr,oauth"`
Token string `jsonapi:"attr,token"`
Url *string `jsonapi:"attr,url"`
Username *string `jsonapi:"attr,username"`

// Relations
Environments []*Environment `jsonapi:"relation,environments,omitempty"`
Expand Down Expand Up @@ -171,10 +173,11 @@ func (s *vcsProviders) Read(ctx context.Context, vcsProviderID string) (*VcsProv
// VcsProviderUpdateOptions represents the options for updating a vcs provider.
type VcsProviderUpdateOptions struct {
// For internal use only!
ID string `jsonapi:"primary,vcs-providers"`
Name *string `jsonapi:"attr,name,omitempty"`
Token *string `jsonapi:"attr,token,omitempty"`
Url *string `jsonapi:"attr,url,omitempty"`
ID string `jsonapi:"primary,vcs-providers"`
Name *string `jsonapi:"attr,name,omitempty"`
Token *string `jsonapi:"attr,token,omitempty"`
Url *string `jsonapi:"attr,url,omitempty"`
Username *string `jsonapi:"attr,username,omitempty"`
}

// Update settings of an existing vcs provider.
Expand Down

0 comments on commit 9f0b670

Please sign in to comment.