(ctx context.Context, user string, repoName string)
| 352 | } |
| 353 | |
| 354 | func (c *Client) ListRepositoryWorkflowRuns(ctx context.Context, user string, repoName string) ([]*github.WorkflowRun, error) { |
| 355 | queued, err := c.listRepositoryWorkflowRuns(ctx, user, repoName, "queued") |
| 356 | if err != nil { |
| 357 | return nil, fmt.Errorf("listing queued workflow runs: %w", err) |
| 358 | } |
| 359 | |
| 360 | inProgress, err := c.listRepositoryWorkflowRuns(ctx, user, repoName, "in_progress") |
| 361 | if err != nil { |
| 362 | return nil, fmt.Errorf("listing in_progress workflow runs: %w", err) |
| 363 | } |
| 364 | |
| 365 | var workflowRuns []*github.WorkflowRun |
| 366 | |
| 367 | workflowRuns = append(workflowRuns, queued...) |
| 368 | workflowRuns = append(workflowRuns, inProgress...) |
| 369 | |
| 370 | return workflowRuns, nil |
| 371 | } |
| 372 | |
| 373 | func (c *Client) listRepositoryWorkflowRuns(ctx context.Context, user string, repoName, status string) ([]*github.WorkflowRun, error) { |
| 374 | var workflowRuns []*github.WorkflowRun |
no test coverage detected