Skip to content

Commit

Permalink
Merge pull request #83 from austenstone/seat-assign-paginate
Browse files Browse the repository at this point in the history
Paginate seats
  • Loading branch information
austenstone authored Aug 29, 2024
2 parents a4e7703 + 75578f8 commit 50deac0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139718,11 +139718,11 @@ const run = async () => {
await createJobSummarySeatInfo(orgSeatInfo.data).write();
}
(0,core.info)(`Fetching Copilot seat assignments for organization ${input.organization}`);
const orgSeatAssignments = await octokit.rest.copilot.listCopilotSeats({
const orgSeatAssignments = await octokit.paginate(octokit.rest.copilot.listCopilotSeats, {
org: input.organization
});
if (orgSeatAssignments?.data?.seats) {
await createJobSummarySeatAssignments(orgSeatAssignments.data.seats)?.write();
if (orgSeatAssignments?.seats) {
await createJobSummarySeatAssignments(orgSeatAssignments?.seats)?.write();
}
}
if (input.organization) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/run.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ const run = async (): Promise<void> => {
if (orgSeatInfo?.data) {
await createJobSummarySeatInfo(orgSeatInfo.data).write();
}

info(`Fetching Copilot seat assignments for organization ${input.organization}`);
const orgSeatAssignments = await octokit.rest.copilot.listCopilotSeats({
const orgSeatAssignments = await octokit.paginate(octokit.rest.copilot.listCopilotSeats, {
org: input.organization
});
if (orgSeatAssignments?.data?.seats) {
await createJobSummarySeatAssignments(orgSeatAssignments.data.seats)?.write();
if (orgSeatAssignments?.seats) {
await createJobSummarySeatAssignments(orgSeatAssignments?.seats)?.write();
}
}

if (input.organization) {
(await createJobSummaryFooter(input.organization)).write();
}
Expand Down

0 comments on commit 50deac0

Please sign in to comment.