(ctx context.Context, enterprise, org, repo, name string)
| 458 | } |
| 459 | |
| 460 | func (r *Client) IsRunnerBusy(ctx context.Context, enterprise, org, repo, name string) (bool, error) { |
| 461 | runners, err := r.ListRunners(ctx, enterprise, org, repo) |
| 462 | if err != nil { |
| 463 | return false, err |
| 464 | } |
| 465 | |
| 466 | for _, runner := range runners { |
| 467 | if runner.GetName() == name { |
| 468 | if runner.GetStatus() == "offline" { |
| 469 | return runner.GetBusy(), &RunnerOffline{runnerName: name} |
| 470 | } |
| 471 | return runner.GetBusy(), nil |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | return false, &RunnerNotFound{runnerName: name} |
| 476 | } |
nothing calls this directly
no test coverage detected