Skip to content

Commit b864ebc

Browse files
committed
refactor(private-registry): standardize field names to use camel case for AWS and JFrog OIDC provider
1 parent a70bb13 commit b864ebc

4 files changed

Lines changed: 68 additions & 68 deletions

File tree

github/github-accessors.go

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/private_registries.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ type PrivateRegistry struct {
8080
TenantID *string `json:"tenant_id,omitempty"`
8181
// ClientID is the client ID of the Azure AD application.
8282
ClientID *string `json:"client_id,omitempty"`
83-
// AwsRegion is the AWS region.
84-
AwsRegion *string `json:"aws_region,omitempty"`
83+
// AWSRegion is the AWS region.
84+
AWSRegion *string `json:"aws_region,omitempty"`
8585
// AccountID is the AWS account ID.
8686
AccountID *string `json:"account_id,omitempty"`
8787
// RoleName is the AWS IAM role name.
@@ -90,8 +90,8 @@ type PrivateRegistry struct {
9090
Domain *string `json:"domain,omitempty"`
9191
// DomainOwner is the CodeArtifact domain owner.
9292
DomainOwner *string `json:"domain_owner,omitempty"`
93-
// JfrogOidcProviderName is the JFrog OIDC provider name.
94-
JfrogOidcProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
93+
// JFrogOIDCProviderName is the JFrog OIDC provider name.
94+
JFrogOIDCProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
9595
// Audience is the OIDC audience.
9696
Audience *string `json:"audience,omitempty"`
9797
// IdentityMappingName is the JFrog identity mapping name.
@@ -152,8 +152,8 @@ type CreateOrganizationPrivateRegistry struct {
152152
// ClientID is the client ID of the Azure AD application. Required when AuthType is "oidc_azure".
153153
ClientID *string `json:"client_id,omitempty"`
154154

155-
// AwsRegion is the AWS region. Required when AuthType is "oidc_aws".
156-
AwsRegion *string `json:"aws_region,omitempty"`
155+
// AWSRegion is the AWS region. Required when AuthType is "oidc_aws".
156+
AWSRegion *string `json:"aws_region,omitempty"`
157157
// AccountID is the AWS account ID. Required when AuthType is "oidc_aws".
158158
AccountID *string `json:"account_id,omitempty"`
159159
// RoleName is the AWS IAM role name. Required when AuthType is "oidc_aws".
@@ -163,8 +163,8 @@ type CreateOrganizationPrivateRegistry struct {
163163
// DomainOwner is the CodeArtifact domain owner (AWS account ID). Required when AuthType is "oidc_aws".
164164
DomainOwner *string `json:"domain_owner,omitempty"`
165165

166-
// JfrogOidcProviderName is the JFrog OIDC provider name. Required when AuthType is "oidc_jfrog".
167-
JfrogOidcProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
166+
// JFrogOIDCProviderName is the JFrog OIDC provider name. Required when AuthType is "oidc_jfrog".
167+
JFrogOIDCProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
168168

169169
// Audience is the OIDC audience. Optional for "oidc_aws" and "oidc_jfrog" auth types.
170170
Audience *string `json:"audience,omitempty"`
@@ -212,8 +212,8 @@ type UpdateOrganizationPrivateRegistry struct {
212212
// ClientID is the client ID of the Azure AD application. Required when AuthType is "oidc_azure".
213213
ClientID *string `json:"client_id,omitempty"`
214214

215-
// AwsRegion is the AWS region. Required when AuthType is "oidc_aws".
216-
AwsRegion *string `json:"aws_region,omitempty"`
215+
// AWSRegion is the AWS region. Required when AuthType is "oidc_aws".
216+
AWSRegion *string `json:"aws_region,omitempty"`
217217
// AccountID is the AWS account ID. Required when AuthType is "oidc_aws".
218218
AccountID *string `json:"account_id,omitempty"`
219219
// RoleName is the AWS IAM role name. Required when AuthType is "oidc_aws".
@@ -223,8 +223,8 @@ type UpdateOrganizationPrivateRegistry struct {
223223
// DomainOwner is the CodeArtifact domain owner (AWS account ID). Required when AuthType is "oidc_aws".
224224
DomainOwner *string `json:"domain_owner,omitempty"`
225225

226-
// JfrogOidcProviderName is the JFrog OIDC provider name. Required when AuthType is "oidc_jfrog".
227-
JfrogOidcProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
226+
// JFrogOIDCProviderName is the JFrog OIDC provider name. Required when AuthType is "oidc_jfrog".
227+
JFrogOIDCProviderName *string `json:"jfrog_oidc_provider_name,omitempty"`
228228

229229
// Audience is the OIDC audience. Optional for "oidc_aws" and "oidc_jfrog" auth types.
230230
Audience *string `json:"audience,omitempty"`

github/private_registries_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func TestPrivateRegistries_UpdateOrganizationPrivateRegistry_OIDC(t *testing.T)
217217

218218
input := &UpdateOrganizationPrivateRegistry{
219219
AuthType: Ptr("oidc_aws"),
220-
AwsRegion: Ptr("us-east-1"),
220+
AWSRegion: Ptr("us-east-1"),
221221
AccountID: Ptr("123456789012"),
222222
RoleName: Ptr("my-role"),
223223
Domain: Ptr("my-domain"),
@@ -254,7 +254,7 @@ func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry_OIDCJFrog(t
254254
RegistryType: PrivateRegistryTypeNpmRegistry,
255255
URL: "https://example.com/npm",
256256
AuthType: Ptr("oidc_jfrog"),
257-
JfrogOidcProviderName: Ptr("my-jfrog-provider"),
257+
JFrogOIDCProviderName: Ptr("my-jfrog-provider"),
258258
Audience: Ptr("jfrog"),
259259
IdentityMappingName: Ptr("my-identity-mapping"),
260260
Visibility: PrivateRegistryVisibilityPrivate,

0 commit comments

Comments
 (0)