summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/events/changed_label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/importer/events/changed_label.rb')
-rw-r--r--lib/gitlab/github_import/importer/events/changed_label.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/importer/events/changed_label.rb b/lib/gitlab/github_import/importer/events/changed_label.rb
index 818a9202745..83130d18db9 100644
--- a/lib/gitlab/github_import/importer/events/changed_label.rb
+++ b/lib/gitlab/github_import/importer/events/changed_label.rb
@@ -12,13 +12,14 @@ module Gitlab
private
def create_event(issue_event)
- ResourceLabelEvent.create!(
- issue_id: issuable_db_id(issue_event),
+ attrs = {
user_id: author_id(issue_event),
label_id: label_finder.id_for(issue_event.label_title),
action: action(issue_event.event),
created_at: issue_event.created_at
- )
+ }.merge(resource_event_belongs_to(issue_event))
+
+ ResourceLabelEvent.create!(attrs)
end
def label_finder