summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/events/renamed.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/importer/events/renamed.rb')
-rw-r--r--lib/gitlab/github_import/importer/events/renamed.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/gitlab/github_import/importer/events/renamed.rb b/lib/gitlab/github_import/importer/events/renamed.rb
index 6a11c492210..96d112b04c6 100644
--- a/lib/gitlab/github_import/importer/events/renamed.rb
+++ b/lib/gitlab/github_import/importer/events/renamed.rb
@@ -4,27 +4,19 @@ module Gitlab
module GithubImport
module Importer
module Events
- class Renamed
- def initialize(project, user_id)
- @project = project
- @user_id = user_id
- end
-
- # issue_event - An instance of `Gitlab::GithubImport::Representation::IssueEvent`
+ class Renamed < BaseImporter
def execute(issue_event)
Note.create!(note_params(issue_event))
end
private
- attr_reader :project, :user_id
-
def note_params(issue_event)
{
- noteable_id: issue_event.issue_db_id,
+ noteable_id: issuable_db_id(issue_event),
noteable_type: Issue.name,
project_id: project.id,
- author_id: user_id,
+ author_id: author_id(issue_event),
note: parse_body(issue_event),
system: true,
created_at: issue_event.created_at,