MCPcopy Create free account
hub / github.com/cli/cli / GetJob

Function GetJob

pkg/cmd/run/shared/shared.go:522–535  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, jobID string)

Source from the content-addressed store, hash-verified

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

Callers 2

runRerunFunction · 0.92
runViewFunction · 0.92

Calls 6

JoinPathFunction · 0.92
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RESTMethod · 0.65
RepoHostMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected