Commit 88bf3c0f authored by Valery Sizov's avatar Valery Sizov

GHE importer: tests fix

parent 1be5291a
......@@ -94,18 +94,20 @@ Settings.omniauth['providers'] ||= []
# Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url.
github_settings = Settings.omniauth['providers'].find{|provider| provider["name"] == "github"}
if github_settings["url"].include?("https://github.com")
if github_settings
if github_settings["url"].include?("https://github.com")
github_settings["args"]["client_options"] = {
"site" => 'https://api.github.com/',
"authorize_url" => 'https://github.com/login/oauth/authorize',
"token_url" => 'https://github.com/login/oauth/access_token'
}
else
else
github_settings["args"]["client_options"] = {
"site" => File.join(github_settings["url"], "api/v3"),
"authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"),
"token_url" => File.join(github_settings["url"], "login/oauth/access_token")
}
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment