Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github/importer.rb')
-rw-r--r--lib/gitlab/github/importer.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/github/importer.rb b/lib/gitlab/github/importer.rb
index c72a1c25e9e..9f0fc6c4471 100644
--- a/lib/gitlab/github/importer.rb
+++ b/lib/gitlab/github/importer.rb
@@ -9,12 +9,12 @@ module Gitlab
def execute
client = octo_client(project.creator.github_access_token)
-
+
#Issues && Comments
client.list_issues(project.import_source, state: :all).each do |issue|
if issue.pull_request.nil?
body = "*Created by: #{issue.user.login}*\n\n#{issue.body}"
-
+
if issue.comments > 0
body += "\n\n\n**Imported comments:**\n"
client.issue_comments(project.import_source, issue.number).each do |c|
@@ -23,7 +23,7 @@ module Gitlab
end
project.issues.create!(
- description: body,
+ description: body,
title: issue.title,
state: issue.state == 'closed' ? 'closed' : 'opened',
author_id: gl_user_id(project, issue.user.id)
@@ -36,7 +36,7 @@ module Gitlab
def octo_client(access_token)
::Octokit.auto_paginate = true
- ::Octokit::Client.new(:access_token => access_token)
+ ::Octokit::Client.new(access_token: access_token)
end
def gl_user_id(project, github_id)