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

Function GetJob

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

Source from the content-addressed store, hash-verified

523}
524
525func 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
541func 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