Commit fde60479 authored by Sean McGivern's avatar Sean McGivern

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

Fix events error importing GitLab projects

Closes #36965

See merge request !13868
parents 3e0757f2 40819467
---
title: Fix events error importing GitLab projects
merge_request:
author:
type: fixed
......@@ -138,3 +138,7 @@ methods:
- :target_branch_sha
project:
- :description_html
events:
- :action
push_event_payload:
- :action
\ No newline at end of file
......@@ -86,6 +86,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