Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
0631c7bc
Commit
0631c7bc
authored
Dec 16, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MR issue to do with merge user
parent
01adeb17
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
changelogs/unreleased/fix-import-export-mr-error.yml
changelogs/unreleased/fix-import-export-mr-error.yml
+4
-0
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+1
-1
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+1
-1
No files found.
app/models/merge_request.rb
View file @
0631c7bc
...
@@ -97,7 +97,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -97,7 +97,7 @@ class MergeRequest < ActiveRecord::Base
validates
:source_branch
,
presence:
true
validates
:source_branch
,
presence:
true
validates
:target_project
,
presence:
true
validates
:target_project
,
presence:
true
validates
:target_branch
,
presence:
true
validates
:target_branch
,
presence:
true
validates
:merge_user
,
presence:
true
,
if: :merge_when_build_succeeds?
validates
:merge_user
,
presence:
true
,
if: :merge_when_build_succeeds?
,
unless: :importing?
validate
:validate_branches
,
unless:
[
:allow_broken
,
:importing?
,
:closed_without_fork?
]
validate
:validate_branches
,
unless:
[
:allow_broken
,
:importing?
,
:closed_without_fork?
]
validate
:validate_fork
,
unless: :closed_without_fork?
validate
:validate_fork
,
unless: :closed_without_fork?
...
...
changelogs/unreleased/fix-import-export-mr-error.yml
0 → 100644
View file @
0631c7bc
---
title
:
Fix Import/Export merge requests error while importing
merge_request
:
author
:
lib/gitlab/import_export/relation_factory.rb
View file @
0631c7bc
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
priorities: :label_priorities
,
priorities: :label_priorities
,
label: :project_label
}.
freeze
label: :project_label
}.
freeze
USER_REFERENCES
=
%w[author_id assignee_id updated_by_id user_id created_by_id]
.
freeze
USER_REFERENCES
=
%w[author_id assignee_id updated_by_id user_id created_by_id
merge_user_id
]
.
freeze
PROJECT_REFERENCES
=
%w[project_id source_project_id gl_project_id target_project_id]
.
freeze
PROJECT_REFERENCES
=
%w[project_id source_project_id gl_project_id target_project_id]
.
freeze
...
...
spec/lib/gitlab/import_export/project.json
View file @
0631c7bc
...
@@ -2517,7 +2517,7 @@
...
@@ -2517,7 +2517,7 @@
"merge_params"
:
{
"merge_params"
:
{
"force_remove_source_branch"
:
null
"force_remove_source_branch"
:
null
},
},
"merge_when_build_succeeds"
:
fals
e
,
"merge_when_build_succeeds"
:
tru
e
,
"merge_user_id"
:
null
,
"merge_user_id"
:
null
,
"merge_commit_sha"
:
null
,
"merge_commit_sha"
:
null
,
"deleted_at"
:
null
,
"deleted_at"
:
null
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment