๐ŸŒ AIๆœ็ดข & ไปฃ็† ไธป้กต
Skip to content

Conversation

@Barbapapazes
Copy link
Member

๐Ÿ”— Linked issue

fix #74

โ“ Type of change

  • ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • โœจ New feature (a non-breaking change that adds functionality)
  • ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

This support pagination by permitting to pass page and per_page parameters. In the same time, it will also store and return the Link header provided by the API.

๐Ÿ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@Barbapapazes Barbapapazes added the enhancement New feature or request label Jan 8, 2024
@Barbapapazes Barbapapazes self-assigned this Jan 8, 2024
@Barbapapazes Barbapapazes requested a review from pi0 January 8, 2024 16:26
@pi0 pi0 changed the title feat: support pagination read all repos in org with pagination Mar 6, 2024
`orgs/${event.context.params.owner}/repos?per_page=100`,
const query = getQuery(event);
const page = query.page ? Number(query.page) : 1;
const perPage = query.perPage ? Number(query.perPage) : 100;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can handle the pagination once and return theall pages instead of asking API consumers to do it.

@BobbieGoede
Copy link

This would be a nice addition (and would resolve allow us to resolve issues like nuxt/scripts#295).

@Barbapapazes / @pi0
I can look into implementing the suggested changes if necessary, I assume you meant returning the complete merged/concatenated results? I suppose that boils down to making requests until the result count is less than per_page (may make the response big depending on the request/repo).

LatterRarity70 added a commit to LatterRarity70/ungh-exp that referenced this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pagination

4 participants