MCPcopy Create free account
hub / github.com/actions/actions-runner-controller / ListRepositoryWorkflowRuns

Method ListRepositoryWorkflowRuns

github/github.go:354–371  ·  view source on GitHub ↗
(ctx context.Context, user string, repoName string)

Source from the content-addressed store, hash-verified

352}
353
354func (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
373func (c *Client) listRepositoryWorkflowRuns(ctx context.Context, user string, repoName, status string) ([]*github.WorkflowRun, error) {
374 var workflowRuns []*github.WorkflowRun

Implementers 1

Clientcontrollers/actions.github.com/multicl

Calls 2

ErrorfMethod · 0.45

Tested by

no test coverage detected