Skip to content

Commit

Permalink
get up to 100 runners in per request
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaitan committed Aug 6, 2024
1 parent 5659035 commit e3aae63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65479,7 +65479,10 @@ async function getRunners(label) {
const octokit = github.getOctokit(config.input.githubToken);

try {
const runners = await octokit.paginate('GET /repos/{owner}/{repo}/actions/runners', config.githubContext);
const runners = await octokit.paginate('GET /repos/{owner}/{repo}/actions/runners', {
...config.githubContext,
per_page: 100,
});
const foundRunners = _.filter(runners, { labels: [{ name: label }] });
return foundRunners.length > 0 ? foundRunners : null;
} catch (error) {
Expand Down
5 changes: 4 additions & 1 deletion src/gh.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ async function getRunners(label) {
const octokit = github.getOctokit(config.input.githubToken);

try {
const runners = await octokit.paginate('GET /repos/{owner}/{repo}/actions/runners', config.githubContext);
const runners = await octokit.paginate('GET /repos/{owner}/{repo}/actions/runners', {
...config.githubContext,
per_page: 100,
});
const foundRunners = _.filter(runners, { labels: [{ name: label }] });
return foundRunners.length > 0 ? foundRunners : null;
} catch (error) {
Expand Down

0 comments on commit e3aae63

Please sign in to comment.