Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

[github] failed to submit commit to github repo. #8

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

Closed
skygragon opened this issue Mar 7, 2018 · 8 comments
Closed

[github] failed to submit commit to github repo. #8

skygragon opened this issue Mar 7, 2018 · 8 comments

Comments

@skygragon
Copy link
Owner

the "github" package has been renamed to "@octokit/rest"

Error: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)

see https://github.com/octokit/rest.js/releases/tag/v14.0.0

@duyue6002
Copy link

same problem

@fakeyanss
Copy link

same

skygragon added a commit that referenced this issue Mar 24, 2018
Signed-off-by: Eric Wang <skygragon@gmail.com>
@skygragon
Copy link
Owner Author

@duyue6002 @fakeyanss please try reinstall github plugin with the latest fix?

@fakeyanss
Copy link

fakeyanss commented Mar 28, 2018

what is "github plugin"? Is it a plugin name?
i see

@skygragon
Copy link
Owner Author

@fakeyanss have you got 'github' plugin finally work?

@fakeyanss
Copy link

Yes, it works. And now the problem is when i want to leetcode submit in a python loop code, just like this:

def submit():
    for file in os.listdir('.'):
        if not re.match("^[0-9]", file): # all submission file name are start with "0-9"
            continue
        os.system('leetcode submit ' + file)
        # time.sleep(20)

it will reponse info like this:

  √ Accepted
  √ 20/20 cases passed (9 ms)
  √ Your runtime beats 61.78 % of java submissions
  √ Committed to https://github.com/fakeYanss/leetcode
  √ Accepted
  √ 476/476 cases passed (5 ms)
  √ Your runtime beats 97.56 % of java submissions
  √ Committed to https://github.com/fakeYanss/leetcode
[ERROR] http error [429]
[ERROR] http error [429]
[ERROR] http error [429]
...

finally i make the program sleep 20s every time in loop, but it is low efficient. Did you have such a problem?

@skygragon
Copy link
Owner Author

skygragon commented Apr 14, 2018

429 error usually means you have sent too many requests to server within a given time window. In you case I guess leetcode.com would refuse to run your further submissions if you try to submit too fast. You have to slow down since leetcode.com won't approve that speed.

Or you could modify github.js to temporarily bypass the leetcode.com submission logic and send file to GitHub directly, while I think you will still get similar error since GitHub itself has rate limit as well: https://developer.github.com/v3/#rate-limiting

@fakeyanss
Copy link

ok, thank for your response. Maybe i should concentrate on the original purpose of solve algorithm problems. And leetcode-cli is a very nice tool. It can provide mostly functions i have expectd. Thany you very much. The last question, do you live in Shanghai now?

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

No branches or pull requests

3 participants