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)
| 275 | // |
| 276 | //meta:operation GET /app/installations |
| 277 | func (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 | // |