octokit / core.js

Extendable client for GitHub's REST & GraphQL APIs
MIT License
1.18k stars 307 forks source link

[BUG]: Headers from API endpoint does not contain a link header #695

Closed yhu02 closed 1 month ago

yhu02 commented 1 month ago

What happened?

The API endpoint is not working as documented at https://api.github.com/orgs/$ORG/packages?package_type=$PACKAGE_TYPE therefore breaking pagination.

The following documentation does not work and only returns the first 100 results. https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28#scripting-with-pagination

Versions

Doesn't concern a version

Relevant log output

HTTP/2 200
date: Wed, 07 Aug 2024 09:33:40 GMT
content-type: application/json; charset=utf-8
content-length: 198103
cache-control: private, max-age=60, s-maxage=60
vary: Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With
etag: "af80462a926a709aec57e471b10b03243614ca8c18b832a8ebdd767bb2eaba63"
x-oauth-scopes: admin:org, admin:public_key, admin:repo_hook, repo, workflow, write:packages
x-accepted-oauth-scopes:
github-authentication-token-expiration: 2024-09-04 17:35:38 UTC
x-github-media-type: github.v3; format=json
x-github-api-version-selected: 2022-11-28
x-ratelimit-limit: 5000
x-ratelimit-remaining: 4969
x-ratelimit-reset: 1723026261
x-ratelimit-used: 31
x-ratelimit-resource: core
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'
server: github.com
x-github-request-id: EB96:6D9CE:153913EB:157D0BB8:66B33F73

Code of Conduct

github-actions[bot] commented 1 month ago

👋 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! 🚀

wolfy1339 commented 1 month ago

You will have to report that to GitHub. We can't do anything from our side https://github.com/orgs/community/discussions/categories/api-and-webhooks