Skip to content
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

[BUG]: response incorrectly normalized: namespace key replaced with indexed keys #560

Open
1 task done
erikbrgn opened this issue Sep 7, 2023 · 3 comments
Open
1 task done
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@erikbrgn
Copy link

erikbrgn commented Sep 7, 2023

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

  • I agree to follow this project's Code of Conduct
@erikbrgn erikbrgn added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Sep 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

👋 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-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Sep 7, 2023
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Sep 8, 2023
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Sep 8, 2023
@nickfloyd nickfloyd added the hacktoberfest Issues for participation in Hacktoberfest label Sep 21, 2023
@larbish
Copy link

larbish commented Nov 8, 2023

I'm facing the same issue

@gr2m
Copy link
Contributor

gr2m commented Nov 8, 2023

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

@wolfy1339 wolfy1339 changed the title [BUG]: Normalizing paginated response [BUG]: response incorrectly normalized: replacing the namespace key with indexed keys Sep 27, 2024
@wolfy1339 wolfy1339 changed the title [BUG]: response incorrectly normalized: replacing the namespace key with indexed keys [BUG]: response incorrectly normalized: namespace key replaced with indexed keys Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

5 participants