Fix rubucop offenses

parent 20e472d9
......@@ -60,8 +60,6 @@ module Gitlab
create_labels
gitlab_issue = nil
client.issues(repo).each do |issue|
begin
description = ''
......@@ -87,7 +85,11 @@ module Gitlab
gitlab_issue.labels << @labels[label_name]
if gitlab_issue.persisted?
import_issue_comments(issue, gitlab_issue) if gitlab_issue.persisted?
end
end
def import_issue_comments(issue, gitlab_issue)
client.issue_comments(repo, issue.iid).each do |comment|
# The note can be blank for issue service messages like "Changed title: ..."
# We would like to import those comments as well but there is no any
......@@ -113,8 +115,6 @@ module Gitlab
end
end
end
end
end
def create_labels
LABELS.each do |label|
......
......@@ -14,7 +14,6 @@ describe Bitbucket::Representation::Issue do
it { expect(described_class.new({}).milestone).to be_nil }
end
describe '#author' do
it { expect(described_class.new({ 'reporter' => { 'username' => 'Ben' } }).author).to eq('Ben') }
it { expect(described_class.new({}).author).to be_nil }
......
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