Closed dschniepp closed 5 months ago
I think you might be looking at the wrong docs. For getting organization repositories, the docs are here and show a max of 100:
The docs you've linked are for the search API, which doesn't apply for the data source for organization repos.
Thank you for pointing it out, I only saw this in the terraform registry, for the github_repositories
data resource. So I think the documentation is then wrong, as I didn't check the GitHub API.
Okay I've had a chance to look at this a little longer and now I think you're right and I'm wrong. The API to retrieve organization repositories does indeed only allow 30 results per page, but upon closer inspection this data source calls the search API which allows 1000 results per page, and not the list repositories endpoint. I was confused.
Would you like to create a PR to modify the validation function, or shall I?
Thank you. I will submit a PR.
Expected Behavior
According to the docs 1000 results per page should be allowed.
Actual Behavior
The maximum number of allow results is 100, according to
toDiagFunc(validation.IntBetween(0, 100), "results_per_page")
Terraform Version
Terraform v1.7.4 on darwin_arm64
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
Daniel Schniepp daniel.schniepp@mercedes-benz.com, Mercedes-Benz Mobility AG on behalf of Mercedes-Benz Tech Innovation GmbH.