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
autoload :License, 'qa/ee/resource/license'
autoload :Epic, 'qa/ee/resource/epic'
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'
module Board
......
......@@ -7,7 +7,7 @@ module QA
class ProjectImportedFromGithub < Resource::Project
attribute :github_repo_id do
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
......@@ -54,11 +54,11 @@ module QA
private
# Github repos client
# Github client
#
# @return [Github::Client::Repos]
def github_repos
@github_repo ||= Github::Client::Repos.new(oauth_token: github_personal_access_token)
# @return [Github::Client]
def github_client
@github_client ||= Github.new(oauth_token: github_personal_access_token)
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