Commit 838bef87 authored by Sean McGivern's avatar Sean McGivern Committed by Jose Ivan Vargas

Merge branch 'fix/import-events' into 'master'

Fix events error importing GitLab projects

Closes #36965

See merge request !13868
parent 6b71f328
---
title: Fix events error importing GitLab projects
merge_request:
author:
type: fixed
......@@ -135,3 +135,7 @@ methods:
- :diff_head_sha
project:
- :description_html
events:
- :action
push_event_payload:
- :action
\ No newline at end of file
......@@ -79,6 +79,10 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
expect(event).not_to be_nil
end
it 'has the action' do
expect(event.action).not_to be_nil
end
it 'event belongs to note, belongs to merge request, belongs to a project' do
expect(event.note.noteable.project).not_to be_nil
end
......
......@@ -35,7 +35,8 @@ module ExportFileHelper
project: project,
commit_id: ci_pipeline.sha)
create(:event, :created, target: milestone, project: project, author: user)
event = create(:event, :created, target: milestone, project: project, author: user, action: 5)
create(:push_event_payload, event: event)
create(:project_member, :master, user: user, project: project)
create(:ci_variable, project: project)
create(:ci_trigger, project: project)
......
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