diff options
Diffstat (limited to 'lib/gitlab/github_import/client.rb')
-rw-r--r-- | lib/gitlab/github_import/client.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/github_import/client.rb b/lib/gitlab/github_import/client.rb index dfe60fb5a03..328f1f742c5 100644 --- a/lib/gitlab/github_import/client.rb +++ b/lib/gitlab/github_import/client.rb @@ -69,6 +69,10 @@ module Gitlab with_rate_limit { octokit.user(username) } end + def pull_request_reviews(repo_name, iid) + with_rate_limit { octokit.pull_request_reviews(repo_name, iid) } + end + # Returns the details of a GitHub repository. # # name - The path (in the form `owner/repository`) of the repository. @@ -76,6 +80,10 @@ module Gitlab with_rate_limit { octokit.repo(name) } end + def pull_request(repo_name, iid) + with_rate_limit { octokit.pull_request(repo_name, iid) } + end + def labels(*args) each_object(:labels, *args) end @@ -155,8 +163,8 @@ module Gitlab end end - def search_repos_by_name(name) - each_page(:search_repositories, search_query(str: name, type: :name)) + def search_repos_by_name(name, options = {}) + octokit.search_repositories(search_query(str: name, type: :name), options) end def search_query(str:, type:, include_collaborations: true, include_orgs: true) |