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

Feat: re-write GitHub pagination links #48

Open
erezrokah opened this issue Jan 24, 2020 · 1 comment
Open

Feat: re-write GitHub pagination links #48

erezrokah opened this issue Jan 24, 2020 · 1 comment

Comments

@erezrokah
Copy link
Contributor

erezrokah commented Jan 24, 2020

Not sure if a feature or a bug.

See here decaporg/decap-cms#3135.

When working with GitHub paginated endpoints the next content URLs are sent back in the Link header.
For example curl --head https://api.github.com/repos/erezrokah/netlify-cms-reproductions/pulls will return:

HTTP/1.1 200 OK
Date: Fri, 24 Jan 2020 07:18:44 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 580116
Server: GitHub.com
Status: 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 49
X-RateLimit-Reset: 1579852666
Cache-Control: public, max-age=60, s-maxage=60
Vary: Accept
ETag: "594fc31b8d42b4e4782492e5c7619d62"
X-GitHub-Media-Type: github.v3; format=json
Link: <https://api.github.com/repositories/233790256/pulls?page=2>; rel="next", <https://api.github.com/repositories/233790256/pulls?page=2>; rel="last"
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy: default-src 'none'
Vary: Accept-Encoding
X-GitHub-Request-Id: FB16:3B0C0:5955597:6B4F95F:5E2A9A53

I think it makes sense for git-gateway to re-write them to make it easier for clients to follow.

@erezrokah erezrokah changed the title Feat: re-write GitHub pagination header Feat: re-write GitHub pagination links Jan 24, 2020
@erezrokah
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant