Skip to content

fix: Ensure all label pages are traversed and remove per_page from API and tests#91

Merged
mheap merged 2 commits intomheap:mainfrom
markscamilleri:fix/paginated-labels
Jun 22, 2025
Merged

fix: Ensure all label pages are traversed and remove per_page from API and tests#91
mheap merged 2 commits intomheap:mainfrom
markscamilleri:fix/paginated-labels

Conversation

@markscamilleri
Copy link
Copy Markdown
Contributor

Problem

I noticed that on PRs with lots of labels, this action can fail. After some investigation, I found out that the API is paginated (GitHub docs: List labels for an issue, Using pagination in the REST API), which means we need to wrap the call with octokit.paginate() if we want to get all the labels.

What changed

  • Use octokit.paginate() to fetch all labels for an issue, ensuring no labels are missed due to pagination.
  • Updated tests to cover pagination scenarios.

--------
cross-spawn  <6.0.6 || >=7.0.0 <7.0.5
Severity: high
Regular Expression Denial of Service (ReDoS) in cross-spawn - GHSA-3xgq-45jj-v275
Regular Expression Denial of Service (ReDoS) in cross-spawn - GHSA-3xgq-45jj-v275
--------
@mheap mheap merged commit 8eb7f59 into mheap:main Jun 22, 2025
@mheap
Copy link
Copy Markdown
Owner

mheap commented Jun 22, 2025

Thank you for the contribution, and especially for adding tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants