Repository: google/go-github
File: github/enterprise_team.go (Go)

Code before:
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#list-members-in-an-enterprise-team
//
//meta:operation GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships
func (s *EnterpriseService) ListTeamMembers(ctx context.Context, enterprise, enterpriseTeam string, opt *ListOptions) ([]*User, *Response, error) {
	u := fmt.Sprintf("enterprises/%v/teams/%v/memberships", enterprise, enterpriseTeam)
	u, err := addOptions(u, opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var members []*User
	resp, err := s.client.Do(ctx, req, &members)
	if err != nil {
		return nil, resp, err
	}

	return members, resp, nil
}

// BulkAddTeamMembers adds multiple members to a team in an enterprise team.
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#bulk-add-team-members
//
//meta:operation POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add
func (s *EnterpriseService) BulkAddTeamMembers(ctx context.Context, enterprise, enterpriseTeam string, username []string) ([]*User, *Response, error) {
	u := fmt.Sprintf("enterprises/%v/teams/%v/memberships/add", enterprise, enterpriseTeam)
	req, err := s.client.NewRequest("POST", u, map[string][]string{"usernames": username})
	if err != nil {
		return nil, nil, err
	}

	var members []*User
	resp, err := s.client.Do(ctx, req, &members)
	if err != nil {
		return nil, resp, err
	}

	return members, resp, nil
}

// BulkRemoveTeamMembers removes multiple members from a team in an enterprise team.
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#bulk-remove-team-members
//
//meta:operation POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove

Review comment (suggestion):
```suggestion
// BulkAddTeamMembers adds multiple members to an enterprise team.
```

Code after:
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#list-members-in-an-enterprise-team
//
//meta:operation GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships
func (s *EnterpriseService) ListTeamMembers(ctx context.Context, enterprise, enterpriseTeam string, opt *ListOptions) ([]*User, *Response, error) {
	u := fmt.Sprintf("enterprises/%v/teams/%v/memberships", enterprise, enterpriseTeam)
	u, err := addOptions(u, opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var members []*User
	resp, err := s.client.Do(ctx, req, &members)
	if err != nil {
		return nil, resp, err
	}

	return members, resp, nil
}

// BulkAddTeamMembers adds multiple members to an enterprise team.
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#bulk-add-team-members
//
//meta:operation POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add
func (s *EnterpriseService) BulkAddTeamMembers(ctx context.Context, enterprise, enterpriseTeam string, username []string) ([]*User, *Response, error) {
	u := fmt.Sprintf("enterprises/%v/teams/%v/memberships/add", enterprise, enterpriseTeam)
	req, err := s.client.NewRequest("POST", u, map[string][]string{"usernames": username})
	if err != nil {
		return nil, nil, err
	}

	var members []*User
	resp, err := s.client.Do(ctx, req, &members)
	if err != nil {
		return nil, resp, err
	}

	return members, resp, nil
}

// BulkRemoveTeamMembers removes multiple members from an enterprise team.
//
// GitHub API docs: https://docs.github.com/rest/enterprise-teams/enterprise-team-members#bulk-remove-team-members
//
//meta:operation POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove