Comments (5)
Thank you for your feedback.
I have indeed not yet implemented this feature because I have no real use of it: each API call is more than half a second long, so it's hard to reach the rate limit.
Anyway, it is easy to extract the rate limiting headers, so I will add an attribute to the Github class to give access to their last value.
Expect it in version 1.0. I will set an expected date on the milestone during the week-end.
from pygithub.
Ah good point about it being hard to reach. Thanks for implementing it. No hurry, though, it's not that important. :-)
from pygithub.
Implemented in ca97469. Will be in version 1.0.
from pygithub.
Thanks. :-)
from pygithub.
each API call is more than half a second long, so it's hard to reach the rate limit.
For the absolute max rate limit, yes. But it's really quite easy to trigger abuse rate limiting:
[2019-04-09T10:02:14.101Z] 2019-04-09 10:02:11,214 POST https://api.github.com/.../pulls/284/reviews {'Content-Type': 'application/json', 'Authorization': 'Basic (login and password removed)', 'User-Agent': 'PyGithub/Python'} {...} ==> 422 {'status': '422 Unprocessable Entity', 'x-accepted-oauth-scopes': '', 'content-length': '171', 'x-github-media-type': 'github.v3; format=json', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff', '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', 'x-github-request-id': '9F34:7C5C:3ABC39:7696C8:5CAC6DA0', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'x-ratelimit-remaining': '4719', 'server': 'GitHub.com', 'x-ratelimit-limit': '5000', 'x-oauth-scopes': 'notifications, public_repo', 'date': 'Tue, 09 Apr 2019 10:02:11 GMT', 'x-frame-options': 'deny', 'access-control-allow-origin': '*', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', 'content-type': 'application/json; charset=utf-8', 'x-xss-protection': '1; mode=block', 'x-ratelimit-reset': '1554806424'} {"message":"Unprocessable Entity","errors":["was submitted too quickly"],"documentation_url":"https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review"}
#1084, FWIW.
from pygithub.
Related Issues (20)
- I am getting a 404 NOT FOUND error HOT 2
- Role is None instead of admin HOT 1
- PullRequest.get_review_requests() only returns requests that have not been completed HOT 1
- Check if a branch has been merged? HOT 2
- Get pull request merged from other repository information from the commit history
- list(repo.get_commits(until=issue_creation_time)) gets stuck for me and never ends
- `head_repo` missing from `create_pull`
- Quick way to get all repo names of an org (or query repos based on regex directly)
- `Team` class using legacy API endpoints HOT 1
- mark notification as done
- Unable to manage teams from GithubIntegration HOT 1
- How to make conditional requests if appropriate in PyGithub?
- unable to list the teams of an organization HOT 1
- 'Wrapper has not been Initialized' error on import in Py3.12 with django 5
- add some tips for `BadCredentialsException`
- Do I need to hardcode my own GPG keys for new UserGPGKey class? HOT 2
- TypeError: 'str' object is not callable when GitHub 500s
- Org Repositories Missing `security_and_analysis` Member
- Org Repository Pagination Only Returns First Page
- Get repo url
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygithub.