summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-02 20:34:52 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-02 20:34:52 +0000
commit0d0042d27481d31027a10edb2ba3a184bff5075a (patch)
tree0ccc0a5a02ab89d8de05205a136c128501a59e50 /lib
parent424cbf46d5d84e604a8404bb0af67a99fe21d337 (diff)
parentd92e4ccc6eeff1c28ed55c4b27a4f97a76d78127 (diff)
downloadgitlab-ce-0d0042d27481d31027a10edb2ba3a184bff5075a.tar.gz
Merge branch 'import-current-user' into 'master'
Import GitHub, Bitbucket or GitLab.com projects owned by authenticated user into current namespace. Addresses #1347. Untested since I'm in a bit of a hurry. Will definitely have time to test and add unit tests before the 7.10 release :) See merge request !481
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitlab_import/client.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/gitlab_import/client.rb b/lib/gitlab/gitlab_import/client.rb
index f48ede9d067..9c00896c913 100644
--- a/lib/gitlab/gitlab_import/client.rb
+++ b/lib/gitlab/gitlab_import/client.rb
@@ -28,6 +28,10 @@ module Gitlab
client.auth_code.get_token(code, redirect_uri: redirect_uri).token
end
+ def user
+ api.get("/api/v3/user").parsed
+ end
+
def issues(project_identifier)
lazy_page_iterator(PER_PAGE) do |page|
api.get("/api/v3/projects/#{project_identifier}/issues?per_page=#{PER_PAGE}&page=#{page}").parsed