Skip to content

Commit

Permalink
feat: GitHub runner scaler - fetch up to 100 workflow runs
Browse files Browse the repository at this point in the history
Signed-off-by: Silviu Dinu <silviudn@gmail.com>
  • Loading branch information
silviu-dinu committed Feb 11, 2025
1 parent cdbad27 commit 7470f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scalers/github_runner_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ func (s *githubRunnerScaler) getWorkflowRunJobs(ctx context.Context, workflowRun

// getWorkflowRuns returns a list of workflow runs for a given repository
func (s *githubRunnerScaler) getWorkflowRuns(ctx context.Context, repoName string, status string) (*WorkflowRuns, error) {
url := fmt.Sprintf("%s/repos/%s/%s/actions/runs?status=%s", s.metadata.githubAPIURL, s.metadata.owner, repoName, status)
url := fmt.Sprintf("%s/repos/%s/%s/actions/runs?status=%s&per_page=100", s.metadata.githubAPIURL, s.metadata.owner, repoName, status)
body, statusCode, err := getGithubRequest(ctx, url, s.metadata, s.httpClient)
if err != nil && statusCode == 404 {
return nil, nil
Expand Down

0 comments on commit 7470f06

Please # to comment.