Skip to content

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

New issue

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

markscamilleri
Copy link

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
--------
Copy link
Author

@markscamilleri markscamilleri Jun 2, 2025

Choose a reason for hiding this comment

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

npm warned me about a high vulnerability in cross-spawn (and 7 moderate) so I ran npm audit fix since a fix was available. Happy to revert if needed but I thought it's best to include this change here.

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

That being said, this does not fix all the moderate ones as to do so requires updating a major version of @actions/github

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.

1 participant