diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-13 19:30:02 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:58:26 -0200 |
commit | f008cdf218952556a0dc93962f55c0ff50733594 (patch) | |
tree | 925f2b875d33c14376e5eec5d1fda409cc4c42dc /lib/gitlab/google_code_import | |
parent | ed7591f7b8c55498e3e38be41cc049a92b9fe4a6 (diff) | |
download | gitlab-ce-f008cdf218952556a0dc93962f55c0ff50733594.tar.gz |
Remove Issuable#add_labels_by_names
Diffstat (limited to 'lib/gitlab/google_code_import')
-rw-r--r-- | lib/gitlab/google_code_import/importer.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb index 8d757da2264..79a0eaba1e8 100644 --- a/lib/gitlab/google_code_import/importer.rb +++ b/lib/gitlab/google_code_import/importer.rb @@ -92,19 +92,16 @@ module Gitlab end issue = Issue.create!( - project_id: project.id, - title: raw_issue["title"], - description: body, - author_id: project.creator_id, - assignee_id: assignee_id, - state: raw_issue["state"] == "closed" ? "closed" : "opened" + iid: raw_issue['id'], + project_id: project.id, + title: raw_issue['title'], + description: body, + author_id: project.creator_id, + assignee_id: assignee_id, + state: raw_issue['state'] == 'closed' ? 'closed' : 'opened' ) - issue.add_labels_by_names(labels, project.creator) - - if issue.iid != raw_issue["id"] - issue.update_attribute(:iid, raw_issue["id"]) - end + issue.update_attribute(:label_ids, project.labels.where(title: labels).pluck(:id)) import_issue_comments(issue, comments) end |