diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-06 21:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-06 21:08:01 +0300 |
commit | 5eb11b697d7ee280b0b5c2ff9a1850a3b5e9b7e3 (patch) | |
tree | 78f8dceccd65aec28bb4cb130cac3ff7e3a75c87 /lib | |
parent | 506159637da758f448818b834f8482238a9eb4eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/bitbucket_import/importer.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/github_import/importer/pull_request_importer.rb | 6 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb index 349ca26ec03..3a087a3ef83 100644 --- a/lib/gitlab/bitbucket_import/importer.rb +++ b/lib/gitlab/bitbucket_import/importer.rb @@ -182,7 +182,6 @@ module Gitlab target_branch_sha: target_branch_sha, state: pull_request.state, author_id: gitlab_user_id(project, pull_request.author), - assignee_id: nil, created_at: pull_request.created_at, updated_at: pull_request.updated_at ) diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb index b7b2fe115c1..886fbaaff48 100644 --- a/lib/gitlab/bitbucket_server_import/importer.rb +++ b/lib/gitlab/bitbucket_server_import/importer.rb @@ -211,7 +211,6 @@ module Gitlab target_branch_sha: pull_request.target_branch_sha, state_id: MergeRequest.available_states[pull_request.state], author_id: author_id, - assignee_id: nil, created_at: pull_request.created_at, updated_at: pull_request.updated_at } diff --git a/lib/gitlab/github_import/importer/pull_request_importer.rb b/lib/gitlab/github_import/importer/pull_request_importer.rb index 6d2aff63a47..f09e0bd9806 100644 --- a/lib/gitlab/github_import/importer/pull_request_importer.rb +++ b/lib/gitlab/github_import/importer/pull_request_importer.rb @@ -27,6 +27,7 @@ module Gitlab mr, already_exists = create_merge_request if mr + set_merge_request_assignees(mr) insert_git_data(mr, already_exists) issuable_finder.cache_database_id(mr.id) end @@ -57,7 +58,6 @@ module Gitlab state_id: ::MergeRequest.available_states[pull_request.state], milestone_id: milestone_finder.id_for(pull_request), author_id: author_id, - assignee_id: user_finder.assignee_id_for(pull_request), created_at: pull_request.created_at, updated_at: pull_request.updated_at } @@ -65,6 +65,10 @@ module Gitlab create_merge_request_without_hooks(project, attributes, pull_request.iid) end + def set_merge_request_assignees(merge_request) + merge_request.assignee_ids = [user_finder.assignee_id_for(pull_request)] + end + def insert_git_data(merge_request, already_exists) insert_or_replace_git_data(merge_request, pull_request.source_branch_sha, pull_request.target_branch_sha, already_exists) # We need to create the branch after the merge request is |