plugin-paginate-rest.js icon indicating copy to clipboard operation
plugin-paginate-rest.js copied to clipboard

[BUG]: Normalizing paginated response

Open erikbrgn opened this issue 1 year ago • 3 comments

What happened?

Using the provided iterator function for the octokit.rest.repos.getAllEnvironments endpoint results in a normalized response where the environments key under response.data is replaced by the environments keyed by their index. This causes the response object to no longer match the response type.

I expected the response to not need normalization and simply return just like the typehinting was telling me.

Versions

Octokit/rest v20.0.1, Deno v1.36.4

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

erikbrgn avatar Sep 07 '23 12:09 erikbrgn

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

github-actions[bot] avatar Sep 07 '23 12:09 github-actions[bot]

I'm facing the same issue

larbish avatar Nov 08 '23 19:11 larbish

if anyone wants to debug why it's not normalizing the response correctly, the code is here: https://github.com/octokit/plugin-paginate-rest.js/blob/main/src/normalize-paginated-list-response.ts

gr2m avatar Nov 08 '23 20:11 gr2m