Skip to content

Commit

Permalink
Use consistent variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
harveysanders committed Sep 5, 2023
1 parent e96fe1d commit 6f0f5a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/cmd/run/shared/shared.go
Expand Up @@ -434,17 +434,17 @@ func GetJobs(client *api.Client, repo ghrepo.Interface, run *Run) ([]Job, error)
return run.Jobs, nil
}

v := url.Values{}
v.Set("per_page", "100")

jobsPath := fmt.Sprintf("%s?%s", run.JobsURL, v.Encode())
query := url.Values{}
query.Set("per_page", "100")
jobsPath := fmt.Sprintf("%s?%s", run.JobsURL, query.Encode())

for jobsPath != "" {
var resp JobsPayload
var err error
jobsPath, err = client.RESTWithNext(repo.RepoHost(), http.MethodGet, jobsPath, nil, &resp)
if err != nil {
return run.Jobs, err
run.Jobs = nil
return nil, err
}

run.Jobs = append(run.Jobs, resp.Jobs...)
Expand Down

0 comments on commit 6f0f5a8

Please sign in to comment.