Commit 56d37ff4 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Address review comments

Use generic Github client
Fix autoload name
parent 4496d7a6
...@@ -217,7 +217,7 @@ module QA ...@@ -217,7 +217,7 @@ module QA
autoload :License, 'qa/ee/resource/license' autoload :License, 'qa/ee/resource/license'
autoload :Epic, 'qa/ee/resource/epic' autoload :Epic, 'qa/ee/resource/epic'
autoload :GroupIteration, 'qa/ee/resource/group_iteration' autoload :GroupIteration, 'qa/ee/resource/group_iteration'
autoload :ImportRepoWithCICD, 'qa/ee/resource/import_repo_with_ci_cd' autoload :ImportRepoWithCiCd, 'qa/ee/resource/import_repo_with_ci_cd'
autoload :PipelineSubscriptions, 'qa/ee/resource/pipeline_subscriptions' autoload :PipelineSubscriptions, 'qa/ee/resource/pipeline_subscriptions'
module Board module Board
......
...@@ -7,7 +7,7 @@ module QA ...@@ -7,7 +7,7 @@ module QA
class ProjectImportedFromGithub < Resource::Project class ProjectImportedFromGithub < Resource::Project
attribute :github_repo_id do attribute :github_repo_id do
github_repository_path.split('/').yield_self do |path| github_repository_path.split('/').yield_self do |path|
github_repos.get(user: path[0], repo: path[1]).id github_client.repos.get(user: path[0], repo: path[1]).id
end end
end end
...@@ -54,11 +54,11 @@ module QA ...@@ -54,11 +54,11 @@ module QA
private private
# Github repos client # Github client
# #
# @return [Github::Client::Repos] # @return [Github::Client]
def github_repos def github_client
@github_repo ||= Github::Client::Repos.new(oauth_token: github_personal_access_token) @github_client ||= Github.new(oauth_token: github_personal_access_token)
end end
end end
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