You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: changed_milestone.rb
    path of file: ./repos/gitlabhq/lib/gitlab/github_import/importer/events
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module GithubImport
    module Importer
      module Events
        class ChangedMilestone < BaseImporter
          # GitHub API doesn't provide the historical state of an issue for
          # de/milestoned issue events. So we'll assign the default state to
          # those events that are imported from G
    
          def create_event(issue_event)
            milestone = project.milestones.find_by_title(issue_event.milestone_title)
            return unless milestone

            attrs = {
              importing: true,
              user_id: author_id(issue_event),
              created_at: issue_event.created_at,
              milestone_id: milestone.id,
              action: action(issue_event.event),
              state: DEFAULT_STATE
            }.merge(resource_event_belongs_to(issue_event))

            ResourceMilestoneEvent.create!(attrs)
          end