Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fb638cc8
Commit
fb638cc8
authored
Feb 06, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GHE importer
parent
80fd5b67
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
config/gitlab.yml.example
config/gitlab.yml.example
+5
-0
lib/gitlab/github_import/client.rb
lib/gitlab/github_import/client.rb
+8
-4
No files found.
config/gitlab.yml.example
View file @
fb638cc8
...
...
@@ -262,6 +262,11 @@ production: &base
# app_secret: 'YOUR APP SECRET',
# args: { scope: 'user:email' } }
# Github Enterprise
#- { name: 'github', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET',
# url: "https://github.example.com/", args: { scope: 'user:email' } }
#
...
...
lib/gitlab/github_import/client.rb
View file @
fb638cc8
...
...
@@ -12,7 +12,7 @@ module Gitlab
if
access_token
::
Octokit
.
auto_paginate
=
true
@api
=
::
Octokit
::
Client
.
new
(
access_token:
access_token
)
@api
=
::
Octokit
::
Client
.
new
(
access_token:
access_token
,
api_endpoint:
api_endpoint
)
end
end
...
...
@@ -45,11 +45,15 @@ module Gitlab
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
"github"
}
end
def
api_endpoint
File
.
join
(
config
[
"url"
],
"/api/v3/"
)
if
config
[
"url"
]
end
def
github_options
{
site:
'https://api.github.com'
,
authorize_url:
'
https://github.com
/login/oauth/authorize'
,
token_url:
'
https://github.com
/login/oauth/access_token'
site:
config
[
"url"
]
||
'https://api.github.com'
,
authorize_url:
'/login/oauth/authorize'
,
token_url:
'/login/oauth/access_token'
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment