Skip to content

Commit 3881d6f

Browse files
ysoldakgmlewis
andcommitted
Apply suggestions from code review
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
1 parent 78d5ca8 commit 3881d6f

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

github/github-accessors.go

Lines changed: 3 additions & 3 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: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/orgs_rules_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestOrganizationsService_GetAllOrganizationRulesets(t *testing.T) {
7171
})
7272
}
7373

74-
func TestOrganizationsService_CreateOrganizationRulesetRepoNames(t *testing.T) {
74+
func TestOrganizationsService_CreateOrganizationRuleset_RepoNames(t *testing.T) {
7575
client, mux, _, teardown := setup()
7676
defer teardown()
7777

@@ -392,7 +392,7 @@ func TestOrganizationsService_CreateOrganizationRulesetRepoNames(t *testing.T) {
392392
})
393393
}
394394

395-
func TestOrganizationsService_CreateOrganizationRulesetRepoIds(t *testing.T) {
395+
func TestOrganizationsService_CreateOrganizationRuleset_RepoIDs(t *testing.T) {
396396
client, mux, _, teardown := setup()
397397
defer teardown()
398398

@@ -541,8 +541,8 @@ func TestOrganizationsService_CreateOrganizationRulesetRepoIds(t *testing.T) {
541541
Include: []string{"refs/heads/main", "refs/heads/master"},
542542
Exclude: []string{"refs/heads/dev*"},
543543
},
544-
RepositoryId: &RulesetRepositoryIdsConditionParameters{
545-
RepositoryIds: []int64{123, 456},
544+
RepositoryID: &RulesetRepositoryIDsConditionParameters{
545+
RepositoryIDs: []int64{123, 456},
546546
},
547547
},
548548
Rules: []*RepositoryRule{
@@ -625,8 +625,8 @@ func TestOrganizationsService_CreateOrganizationRulesetRepoIds(t *testing.T) {
625625
Include: []string{"refs/heads/main", "refs/heads/master"},
626626
Exclude: []string{"refs/heads/dev*"},
627627
},
628-
RepositoryId: &RulesetRepositoryIdsConditionParameters{
629-
RepositoryIds: []int64{123, 456},
628+
RepositoryID: &RulesetRepositoryIDsConditionParameters{
629+
RepositoryIDs: []int64{123, 456},
630630
},
631631
},
632632
Rules: []*RepositoryRule{

github/repos_rules.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ type RulesetRepositoryNamesConditionParameters struct {
4141
Protected *bool `json:"protected,omitempty"`
4242
}
4343

44-
// RulesetRepositoryIdsConditionParameters represents the conditions object for repository_ids.
45-
type RulesetRepositoryIdsConditionParameters struct {
46-
RepositoryIds []int64 `json:"repository_ids,omitempty"`
44+
// RulesetRepositoryIDsConditionParameters represents the conditions object for repository_ids.
45+
type RulesetRepositoryIDsConditionParameters struct {
46+
RepositoryIDs []int64 `json:"repository_ids,omitempty"`
4747
}
4848

4949
// RulesetCondition represents the conditions object in a ruleset.
50-
// Set either RepositoryName or RepositoryId, not both
50+
// Set either RepositoryName or RepositoryID, not both.
5151
type RulesetConditions struct {
5252
RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"`
5353
RepositoryName *RulesetRepositoryNamesConditionParameters `json:"repository_name,omitempty"`
54-
RepositoryId *RulesetRepositoryIdsConditionParameters `json:"repository_id,omitempty"`
54+
RepositoryID *RulesetRepositoryIDsConditionParameters `json:"repository_id,omitempty"`
5555
}
5656

5757
// RulePatternParameters represents the rule pattern parameters.

0 commit comments

Comments
 (0)