Skip to content

ListOptions missing from GetAllOrganizationRulesets, Repositories.GetAllRulesets, Repositories.GetRulesForBranch functions #3560

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

Closed
ktruedat opened this issue Apr 23, 2025 · 4 comments · Fixed by #3562
Assignees
Labels
Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). enhancement good first issue

Comments

@ktruedat
Copy link
Contributor

ktruedat commented Apr 23, 2025

According to the Github API documentation for this endpoint (https://docs.github.com/en/rest/orgs/rules?apiVersion=2022-11-28#get-all-organization-repository-rulesets), there are pagination params needed to be able to fetch all the organization rulesets. However, the GetAllOrganizationRulesets doesn't have a ListOptions parameter that can be passed to the function and respectively to Github API for handling the pagination params. By default this API endpoint supports a 30 Per Page items with the default page being 1. Having no way to specify this params in the GetAllOrganizationRulesets will result in getting only the first 30 rulesets for the organization.

The same issue applies for Repositories.GetAllRulesets, Repositories.GetRulesForBranch functions, having no way to specify the pagination params

@ktruedat ktruedat changed the title ListOptions missing from GetAllOrganizationRulesets function ListOptions missing from GetAllOrganizationRulesets, Repositories.GetAllRulesets, Repositories.GetRulesForBranch functions Apr 23, 2025
@gmlewis gmlewis added enhancement good first issue Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Apr 23, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Apr 23, 2025

Thank you, @ktruedat! Would you like to create a PR to address this, or shall I open it up to our other amazing contributors to fix this?

@ktruedat
Copy link
Contributor Author

@gmlewis thank you! I will try to make a PR myself fixing this, it is a great honor for me to contribute to this project!

@gmlewis
Copy link
Collaborator

gmlewis commented Apr 23, 2025

@gmlewis thank you! I will try to make a PR myself fixing this, it is a great honor for me to contribute to this project!

Thank you, @ktruedat! It's yours.

@ktruedat
Copy link
Contributor Author

I have created the PR here #3562
Could you please have a look @gmlewis ? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). enhancement good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants