wpsharks / wp-kb-articles

KB Articles for WordPress; adds a new Custom Post Type.
http://wpkbarticles.com/
2 stars 1 forks source link

GitHub Connectivity Test Button #13

Closed brucewrks closed 9 years ago

brucewrks commented 9 years ago

Related to #11 and #2

The GitHub API Class currently returns FALSE on an error code from GitHub. This can be changed to handle this response codes in a better way to let the site owner know something went wrong.

Open to ideas on how to handle this @jaswsinc

jaswrks commented 9 years ago

I think we can simply add a "Test GitHub Connectivity" button into the admin panel to help avoid a scenario where a site owner has given invalid credentials. I see this as being the real issue, so we can just go straight to that problem by providing a test button.

Do you know if there is a GitHub API ping test that's part of the API?

As for other error codes. I think if there's a real problem that we will receive reports about this. Otherwise, if it's just random connectivity issues then those are going to be expected from time to time.

raamdev commented 9 years ago

I love the idea of a "Test GitHub Connectivity" button.

brucewrks commented 9 years ago

Do you know if there is a GitHub API ping test that's part of the API?

@jaswsinc You could use this endpoint to test for Authentication. If the limit is above 60, then you're authenticated: https://developer.github.com/v3/rate_limit/

Alternatively, you could just try retrieving the tree from the repo provided.

raamdev commented 9 years ago

@brucewsinc This is labeled help wanted but I see it's assigned to you. Are you taking care of this issue? If so, please remove the help wanted label.

jaswrks commented 9 years ago

This has been implemented.

2015-03-02_15-15-48

raamdev commented 9 years ago

@jaswsinc Woohoo! Nice work! :-)