MCPcopy Index your code
hub / github.com/google/go-github / ListCopilotSeats

Method ListCopilotSeats

github/copilot.go:311–330  ·  view source on GitHub ↗

ListCopilotSeats lists Copilot for Business seat assignments for an organization. To paginate through all seats, populate 'Page' with the number of the last page. GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management?apiVersion=2022-11-28#list-all-copilot-seat-assignments-f

(ctx context.Context, org string, opts *ListOptions)

Source from the content-addressed store, hash-verified

309//
310//meta:operation GET /orgs/{org}/copilot/billing/seats
311func (s *CopilotService) ListCopilotSeats(ctx context.Context, org string, opts *ListOptions) (*ListCopilotSeatsResponse, *Response, error) {
312 u := fmt.Sprintf("orgs/%v/copilot/billing/seats", org)
313 u, err := addOptions(u, opts)
314 if err != nil {
315 return nil, nil, err
316 }
317
318 req, err := s.client.NewRequest(ctx, "GET", u, nil)
319 if err != nil {
320 return nil, nil, err
321 }
322
323 var copilotSeats *ListCopilotSeatsResponse
324 resp, err := s.client.Do(req, &copilotSeats)
325 if err != nil {
326 return nil, resp, err
327 }
328
329 return copilotSeats, resp, nil
330}
331
332// ListCopilotEnterpriseSeats lists Copilot for Business seat assignments for an enterprise.
333//

Callers 2

ListCopilotSeatsIterMethod · 0.95

Calls 3

addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45

Tested by 1