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
felixlut and gmlewis authored Sep 22, 2024
1 parent 62b08f8 commit 1583b9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions github/orgs_custom_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ func (s *OrganizationsService) AssignOrgRoleToTeam(ctx context.Context, org, tea
return resp, nil
}

// RemoveOrgRoleFromTeam removes an existing organization role assignment to a team in this organization.
// RemoveOrgRoleFromTeam removes an existing organization role assignment from a team in this organization.
// In order to remove organization role assignments in an organization, the authenticated user must be an organization owner.
//
// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-team
//
//meta:operation DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}
func (s *OrganizationsService) RemoveOrgRoleFromTeam(ctx context.Context, org string, teamSlug string, roleID int64) (*Response, error) {
func (s *OrganizationsService) RemoveOrgRoleFromTeam(ctx context.Context, org, teamSlug string, roleID int64) (*Response, error) {
u := fmt.Sprintf("orgs/%v/organization-roles/teams/%v/%v", org, teamSlug, roleID)

req, err := s.client.NewRequest("DELETE", u, nil)
Expand All @@ -206,7 +206,7 @@ func (s *OrganizationsService) RemoveOrgRoleFromTeam(ctx context.Context, org st
// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-user
//
//meta:operation PUT /orgs/{org}/organization-roles/users/{username}/{role_id}
func (s *OrganizationsService) AssignOrgRoleToUser(ctx context.Context, org string, username string, roleID int64) (*Response, error) {
func (s *OrganizationsService) AssignOrgRoleToUser(ctx context.Context, org, username string, roleID int64) (*Response, error) {
u := fmt.Sprintf("orgs/%v/organization-roles/users/%v/%v", org, username, roleID)

req, err := s.client.NewRequest("PUT", u, nil)
Expand All @@ -222,13 +222,13 @@ func (s *OrganizationsService) AssignOrgRoleToUser(ctx context.Context, org stri
return resp, nil
}

// RemoveOrgRoleFromUser removes an existing organization role assignment to a user in this organization.
// RemoveOrgRoleFromUser removes an existing organization role assignment from a user in this organization.
// In order to remove organization role assignments in an organization, the authenticated user must be an organization owner.
//
// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-user
//
//meta:operation DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}
func (s *OrganizationsService) RemoveOrgRoleFromUser(ctx context.Context, org string, username string, roleID int64) (*Response, error) {
func (s *OrganizationsService) RemoveOrgRoleFromUser(ctx context.Context, org, username string, roleID int64) (*Response, error) {
u := fmt.Sprintf("orgs/%v/organization-roles/users/%v/%v", org, username, roleID)

req, err := s.client.NewRequest("DELETE", u, nil)
Expand Down

0 comments on commit 1583b9a

Please sign in to comment.