Skip to content

Commit 023ec71

Browse files
committed
linter
1 parent 29be2f2 commit 023ec71

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

pkg/connector/connector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const githubDotCom = "https://github.com"
3131

3232
var (
3333
ValidAssetDomains = []string{"avatars.githubusercontent.com"}
34-
max_page_size int = 100 // maximum page size github supported.
34+
maxPageSize int = 100 // maximum page size github supported.
3535
)
3636

3737
var (
@@ -427,7 +427,7 @@ func getOrgs(ctx context.Context, client *github.Client, orgs []string) ([]strin
427427
orgLogins []string
428428
)
429429
for {
430-
orgs, resp, err := client.Organizations.List(ctx, "", &github.ListOptions{Page: page, PerPage: max_page_size})
430+
orgs, resp, err := client.Organizations.List(ctx, "", &github.ListOptions{Page: page, PerPage: maxPageSize})
431431
if err != nil {
432432
return nil, fmt.Errorf("github-connector: failed to retrieve org: %w", err)
433433
}

pkg/connector/org.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (o *orgResourceType) List(
9595

9696
opts := &github.ListOptions{
9797
Page: page,
98-
PerPage: max_page_size,
98+
PerPage: maxPageSize,
9999
}
100100

101101
orgs, resp, err := o.client.Organizations.List(ctx, "", opts)
@@ -188,7 +188,7 @@ func (o *orgResourceType) Grants(
188188
opts := github.ListMembersOptions{
189189
ListOptions: github.ListOptions{
190190
Page: page,
191-
PerPage: max_page_size,
191+
PerPage: maxPageSize,
192192
},
193193
}
194194

pkg/connector/org_role.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (o *orgRoleResourceType) Grants(
164164
case resourceTypeUser.Id:
165165
opts := &github.ListOptions{
166166
Page: page,
167-
PerPage: max_page_size,
167+
PerPage: maxPageSize,
168168
}
169169
users, resp, err := o.client.Organizations.ListUsersAssignedToOrgRole(ctx, orgName, roleID, opts)
170170
if err != nil {
@@ -209,7 +209,7 @@ func (o *orgRoleResourceType) Grants(
209209
case resourceTypeTeam.Id:
210210
opts := &github.ListOptions{
211211
Page: page,
212-
PerPage: max_page_size,
212+
PerPage: maxPageSize,
213213
}
214214
teams, resp, err := o.client.Organizations.ListTeamsAssignedToOrgRole(ctx, orgName, roleID, opts)
215215
if err != nil {

pkg/connector/repository.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (o *repositoryResourceType) List(ctx context.Context, parentID *v2.Resource
8282
opts := &github.RepositoryListByOrgOptions{
8383
ListOptions: github.ListOptions{
8484
Page: page,
85-
PerPage: max_page_size,
85+
PerPage: maxPageSize,
8686
},
8787
}
8888

@@ -163,7 +163,7 @@ func (o *repositoryResourceType) Grants(
163163
Affiliation: "all",
164164
ListOptions: github.ListOptions{
165165
Page: page,
166-
PerPage: max_page_size,
166+
PerPage: maxPageSize,
167167
},
168168
}
169169
users, resp, err := o.client.Repositories.ListCollaborators(ctx, orgName, resource.DisplayName, opts)
@@ -212,7 +212,7 @@ func (o *repositoryResourceType) Grants(
212212
case resourceTypeTeam.Id:
213213
opts := &github.ListOptions{
214214
Page: page,
215-
PerPage: max_page_size,
215+
PerPage: maxPageSize,
216216
}
217217
teams, resp, err := o.client.Repositories.ListTeams(ctx, orgName, resource.DisplayName, opts)
218218
if err != nil {

pkg/connector/team.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (o *teamResourceType) List(ctx context.Context, parentID *v2.ResourceId, pt
7878

7979
opts := &github.ListOptions{
8080
Page: page,
81-
PerPage: max_page_size,
81+
PerPage: maxPageSize,
8282
}
8383

8484
orgID, err := parseResourceToGitHub(parentID)
@@ -177,7 +177,7 @@ func (o *teamResourceType) Grants(ctx context.Context, resource *v2.Resource, pT
177177
opts := github.TeamListTeamMembersOptions{
178178
ListOptions: github.ListOptions{
179179
Page: page,
180-
PerPage: max_page_size,
180+
PerPage: maxPageSize,
181181
},
182182
}
183183

pkg/connector/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (o *userResourceType) List(ctx context.Context, parentID *v2.ResourceId, pt
125125
opts := github.ListMembersOptions{
126126
ListOptions: github.ListOptions{
127127
Page: page,
128-
PerPage: max_page_size,
128+
PerPage: maxPageSize,
129129
},
130130
}
131131

0 commit comments

Comments
 (0)