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

fix(types): correct pagination return type for data which is an array #662

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

Conversation

wolfy1339
Copy link
Member

Resolves #661


Before the change?

  • When response data from GitHub is an array, the type would have an extra OctokitResponse<T, S> in the data types

After the change?

  • When response data from GitHub is an array, return an empty object in the types

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Instead of returning `T` in `GetPaginationKeys<T>`, we return an empty object, because T would be an `OctokitResponse<T, S>`, and there is no response data in the `data` field

Fixes #661
@wolfy1339 wolfy1339 added the Type: Bug Something isn't working as documented label Feb 18, 2025
Copy link
Contributor

👋 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 labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
Status: 🔖 Ready
Development

Successfully merging this pull request may close these issues.

[BUG]: Regression with 11.4.2 adding & OctokitResponse<...> to return type
1 participant