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

added support for new github api. requires github.token config item set. updated README #12

Merged
merged 5 commits into from Apr 30, 2014

Conversation

michaelshobbs
Copy link
Contributor

No description provided.

@michaelshobbs
Copy link
Contributor Author

I suppose http://hub.github.com/ makes this obsolete.... :(

print "loading pull request info for request %s..." % (pullreq)
print
url = "https://api.github.com/repos/%s/pulls/%s" % (repo, pullreq)
req = urllib2.Request(url)
req = urllib2.Request(
url, headers={'User-Agent': 'Awesome-Octocat-App', 'Authorization': 'token ' + token})
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a real Application name. Also authentication should be optional and only be needed when pulling private repository info

@michaelshobbs
Copy link
Contributor Author

Done. The GH api returns a 404 in the case of a repo that does not exist and in the case where you attempt to access a private repo without a token. I attempt to get a a token every run, proceed if it doesn't exist and hint at adding one if we get a 404.

I also attempted to deal with missing remotes more gracefully

splitbrain added a commit that referenced this pull request Apr 30, 2014
added support for new github api. requires github.token config item set. updated README
@splitbrain splitbrain merged commit 5bb2ebc into splitbrain:master Apr 30, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants