| 523 | } |
| 524 | |
| 525 | func GetJob(client *api.Client, repo ghrepo.Interface, jobID string) (*Job, error) { |
| 526 | path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "actions", "jobs", jobID) |
| 527 | if err != nil { |
| 528 | return nil, err |
| 529 | } |
| 530 | |
| 531 | var result Job |
| 532 | err = client.REST(repo.RepoHost(), "GET", path.String(), nil, &result) |
| 533 | if err != nil { |
| 534 | return nil, err |
| 535 | } |
| 536 | |
| 537 | return &result, nil |
| 538 | } |
| 539 | |
| 540 | // SelectRun prompts the user to select a run from a list of runs by using the recommended prompter interface |
| 541 | func SelectRun(p Prompter, cs *iostreams.ColorScheme, runs []Run) (string, error) { |