Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Glenn Lewis <[email protected]>
  • Loading branch information
ysoldak and gmlewis authored Jul 4, 2023
1 parent 062975e commit cdb54f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions github/orgs_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestOrganizationsService_GetAllOrganizationRulesets(t *testing.T) {
})
}

func TestOrganizationsService_CreateOrganizationRulesetRepoNames(t *testing.T) {
func TestOrganizationsService_CreateOrganizationRuleset_RepoNames(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand Down Expand Up @@ -392,7 +392,7 @@ func TestOrganizationsService_CreateOrganizationRulesetRepoNames(t *testing.T) {
})
}

func TestOrganizationsService_CreateOrganizationRulesetRepoIds(t *testing.T) {
func TestOrganizationsService_CreateOrganizationRuleset_RepoIDs(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand Down
10 changes: 5 additions & 5 deletions github/repos_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ type RulesetRepositoryNamesConditionParameters struct {
Protected *bool `json:"protected,omitempty"`
}

// RulesetRepositoryIdsConditionParameters represents the conditions object for repository_ids.
type RulesetRepositoryIdsConditionParameters struct {
RepositoryIds []int64 `json:"repository_ids,omitempty"`
// RulesetRepositoryIDsConditionParameters represents the conditions object for repository_ids.
type RulesetRepositoryIDsConditionParameters struct {
RepositoryIDs []int64 `json:"repository_ids,omitempty"`
}

// RulesetCondition represents the conditions object in a ruleset.
// Set either RepositoryName or RepositoryId, not both
// Set either RepositoryName or RepositoryID, not both.
type RulesetConditions struct {
RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"`
RepositoryName *RulesetRepositoryNamesConditionParameters `json:"repository_name,omitempty"`
RepositoryId *RulesetRepositoryIdsConditionParameters `json:"repository_id,omitempty"`
RepositoryID *RulesetRepositoryIDsConditionParameters `json:"repository_id,omitempty"`
}

// RulePatternParameters represents the rule pattern parameters.
Expand Down

0 comments on commit cdb54f4

Please sign in to comment.