8000 fix: Ensure all label pages are traversed and remove per_page from API and tests by markscamilleri · Pull Request #91 · mheap/github-action-required-labels · GitHub
[go: up one dir, main page]

Skip to content

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

New issue
8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 22, 2025

Conversation

markscamilleri
Copy link
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
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
0