octokit / go-octokit

Simple Go wrapper for the GitHub API
https://github.com/octokit/go-octokit
MIT License
258 stars 79 forks source link

Add helpers to access the scope and rate limit headers. #103

Closed calavera closed 9 years ago

owenthereal commented 9 years ago

In general, LGTM. Could add some tests though. @pengwynn What do you think?

pengwynn commented 9 years ago

Thanks for the patch @calavera. :sparkling_heart: I left a couple of notes.

calavera commented 9 years ago

Thank you guys, I'll add some tests today.

calavera commented 9 years ago

@pengwynn, @jingweno I've added some tests for these helpers. I don't remember what GitHub Enterprise returns as rate limit, but I've used -1 to indicate no limit. I take suggestions for a better default in that case.

pengwynn commented 9 years ago

I don't remember what GitHub Enterprise returns as rate limit,

It's currently not rate limited. I think -1 is a sane default in that case. Thanks for the patch, @calavera.

owenthereal commented 9 years ago

:+1: