MCPcopy Create free account
hub / github.com/google/go-github / ListInstallations

Method ListInstallations

github/apps.go:277–295  ·  view source on GitHub ↗

ListInstallations lists the installations that the current GitHub App has. GitHub API docs: https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#list-installations-for-the-authenticated-app meta:operation GET /app/installations

(ctx context.Context, opts *ListOptions)

Source from the content-addressed store, hash-verified

275//
276//meta:operation GET /app/installations
277func (s *AppsService) ListInstallations(ctx context.Context, opts *ListOptions) ([]*Installation, *Response, error) {
278 u, err := addOptions("app/installations", opts)
279 if err != nil {
280 return nil, nil, err
281 }
282
283 req, err := s.client.NewRequest(ctx, "GET", u, nil)
284 if err != nil {
285 return nil, nil, err
286 }
287
288 var i []*Installation
289 resp, err := s.client.Do(req, &i)
290 if err != nil {
291 return nil, resp, err
292 }
293
294 return i, resp, nil
295}
296
297// GetInstallation returns the specified installation.
298//

Calls 3

addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45