Commit 0631c7bc authored by James Lopez's avatar James Lopez

Fix MR issue to do with merge user

parent 01adeb17
...@@ -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?
......
---
title: Fix Import/Export merge requests error while importing
merge_request:
author:
...@@ -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
......
...@@ -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": false, "merge_when_build_succeeds": true,
"merge_user_id": null, "merge_user_id": null,
"merge_commit_sha": null, "merge_commit_sha": null,
"deleted_at": null, "deleted_at": null,
......
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