feat: pass 0 to fetch latest attempt

This commit is contained in:
Wing-Kam Wong 2023-03-26 14:11:19 +08:00
parent 2894695652
commit bd0f535dea
3 changed files with 4 additions and 4 deletions

View file

@ -95,7 +95,7 @@ func runCancel(opts *CancelOptions) error {
}
}
} else {
run, err = shared.GetRun(client, repo, runID)
run, err = shared.GetRun(client, repo, runID, 0)
if err != nil {
var httpErr api.HTTPError
if errors.As(err, &httpErr) {

View file

@ -139,7 +139,7 @@ func runRerun(opts *RerunOptions) error {
}
} else {
opts.IO.StartProgressIndicator()
run, err := shared.GetRun(client, repo, runID)
run, err := shared.GetRun(client, repo, runID, 0)
opts.IO.StopProgressIndicator()
if err != nil {
return fmt.Errorf("failed to get run: %w", err)

View file

@ -114,7 +114,7 @@ func watchRun(opts *WatchOptions) error {
}
}
} else {
run, err = shared.GetRun(client, repo, runID)
run, err = shared.GetRun(client, repo, runID, 0)
if err != nil {
return fmt.Errorf("failed to get run: %w", err)
}
@ -201,7 +201,7 @@ func renderRun(out io.Writer, opts WatchOptions, client *api.Client, repo ghrepo
var err error
run, err = shared.GetRun(client, repo, fmt.Sprintf("%d", run.ID))
run, err = shared.GetRun(client, repo, fmt.Sprintf("%d", run.ID), 0)
if err != nil {
return nil, fmt.Errorf("failed to get run: %w", err)
}