-
Notifications
You must be signed in to change notification settings - Fork 9
Add support for specifying a separate Github base URL #80
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
Conversation
@@ -55,6 +55,10 @@ def receive_issue | |||
|
|||
private | |||
|
|||
def base_url | |||
ENV["CODECLIMATE_GITHUB_API_URL"] || DEFAULT_BASE_URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this defaulting happen in CodeClimate::Config
and use CodeClimate.config[:github_api_url]
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gem won't always have access to that config object, will it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do default there, but I didn't think it was re-usable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess I'm confused why you think this code wouldn't be able to call CodeClimate.config
, it's all in the same Ruby process, right?
When using GH:E, api.github.com will not be the endpoint used to handle PRs and issues. We can specify it in the configuration to handle that case better. Defaulting it to api.github.com means that we do not need to backfil any data.
7d3d940
to
c6b5f49
Compare
@codeclimate/review Ready for another look |
The change LGTM -- I think @brynary mentioned in chat that we need to make this field hidden before we can ship it, and I agree. |
Sorry! Thought this was an App PR (that explains earlier confusion too). LGTM :) |
Add support for specifying a separate Github base URL
Let's make sure hidden is actually "protected" (as in, can't slip in bad values via unexpected form POST) —Bryan Helmkamp, Founder, Code Climate bryan@brynary.com / 646-379-1810 / @brynary Typed with thumbs. On Wed, Sep 9, 2015 at 6:27 PM, pat brisbin notifications@github.com
|
When using GH:E, api.github.com will not be the endpoint used to handle
PRs and issues. We can specify it in the configuration to handle that
case better. Defaulting it to api.github.com means that we do not need
to backfill any data.
@codeclimate/review