Commit c47183d7 authored by Stan Hu's avatar Stan Hu

Fixes for review of GitHub Enterprise backport changes

parent eede0323
...@@ -143,7 +143,7 @@ Settings.omniauth.session_tickets['cas3'] = 'ticket' ...@@ -143,7 +143,7 @@ Settings.omniauth.session_tickets['cas3'] = 'ticket'
# Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url. # Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url.
github_default_url = "https://github.com" github_default_url = "https://github.com"
github_settings = Settings.omniauth['providers'].find { |provider| provider["name"] == "github"} github_settings = Settings.omniauth['providers'].find { |provider| provider["name"] == "github" }
if github_settings if github_settings
# For compatibility with old config files (before 7.8) # For compatibility with old config files (before 7.8)
...@@ -158,9 +158,9 @@ if github_settings ...@@ -158,9 +158,9 @@ if github_settings
github_settings["args"]["client_options"] = OmniAuth::Strategies::GitHub.default_options[:client_options] github_settings["args"]["client_options"] = OmniAuth::Strategies::GitHub.default_options[:client_options]
else else
github_settings["args"]["client_options"] = { github_settings["args"]["client_options"] = {
"site" => File.join(github_settings["url"], "api/v3"), "site" => File.join(github_settings["url"], "api/v3"),
"authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"), "authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"),
"token_url" => File.join(github_settings["url"], "login/oauth/access_token") "token_url" => File.join(github_settings["url"], "login/oauth/access_token")
} }
end end
end end
......
...@@ -78,7 +78,7 @@ GitHub will generate an application ID and secret key for you to use. ...@@ -78,7 +78,7 @@ GitHub will generate an application ID and secret key for you to use.
args: { scope: 'user:email' } } args: { scope: 'user:email' } }
``` ```
__Replace `https://github.example.com/` with your GitHub URL__ __Replace `https://github.example.com/` with your GitHub URL.__
1. Change 'YOUR_APP_ID' to the client ID from the GitHub application page from step 7. 1. Change 'YOUR_APP_ID' to the client ID from the GitHub application page from step 7.
......
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