Join GitHub today
Add support for private repos through Github oAuth #15
I saw your request for adding support for private repos, so I took a shot at it. This branch allows updates from private repositories using an oAuth token, and it provides setup assistance through Plugins > Github Updater.
Once an application is setup and and a token is given, the WPGitHubUpdaterSetup class isn't needed anymore. The token will authorize updates on all sites from then on, and will allow the plugin author to revoke privileges in the future if they wish.
While in there, I noticed that in get_github_data(), wp_remote_get was being passed
Hope this helps!
PS: While fishing around in the github APIs, I noticed that they allow querying a repos tags, and the response gives all versions with zipball URLS:
Looks like the config values for api_url, raw_url, github_url, and zip_url could all be replaced by that one URL, and the readme would no longer need to include a version number (because they're listed in the tags). Thoughts?
Sorry for the delay in getting back to you. This does look really good and thanks for building this feature out. I left a few minor comments about coding nitpickiness on my part, would be great if you could address those and I'll gladly merge this in.
I'm head-down prepping to present at WCLA the day after tomorrow, but should be able to finalize this immediately afterwards. I have moved it back to the top of my task list -- it's been far too long for me to finalize the small changed you laid out.
Thanks for the reminder, and for your patience!
The branch has been functionally complete since 4 months ago, and the formatting changes Joey requested were completed 22 months ago. You can use the branch on my repo if you'd like.
When discussing another pull request two weeks ago, jkudish commented that he'd review this one, but wouldn't get to them within a week.
It had been my hope to develop features for jkudish's version and keep his as the main version. But, at the moment, I'm unsure on how to proceed and unsure if my submitting work is @jkudish's preference.
added a commit
this pull request
Oct 12, 2012
referenced this pull request
Oct 12, 2012
Otherwise, yes, the GitHub oAuth API does set read/write access, and it would not be prudent to use it for a publicly-released private plugin without setting up permissions in your Github organization.