()
| 2326 | } |
| 2327 | |
| 2328 | func (r *basePoolManager) FetchTools() ([]commonParams.RunnerApplicationDownload, error) { |
| 2329 | tools, ghResp, err := r.ghcli.ListEntityRunnerApplicationDownloads(r.ctx) |
| 2330 | if err != nil { |
| 2331 | if ghResp != nil && ghResp.StatusCode == http.StatusUnauthorized { |
| 2332 | return nil, runnerErrors.NewUnauthorizedError("error fetching tools") |
| 2333 | } |
| 2334 | return nil, fmt.Errorf("error fetching runner tools: %w", err) |
| 2335 | } |
| 2336 | |
| 2337 | ret := []commonParams.RunnerApplicationDownload{} |
| 2338 | for _, tool := range tools { |
| 2339 | if tool == nil { |
| 2340 | continue |
| 2341 | } |
| 2342 | ret = append(ret, commonParams.RunnerApplicationDownload(*tool)) |
| 2343 | } |
| 2344 | return ret, nil |
| 2345 | } |
| 2346 | |
| 2347 | func (r *basePoolManager) GetWebhookInfo(ctx context.Context) (params.HookInfo, error) { |
| 2348 | allHooks, err := r.listHooks(ctx) |
no test coverage detected