diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/services/merge_requests | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/services/merge_requests')
6 files changed, 7 insertions, 4 deletions
diff --git a/app/services/merge_requests/after_create_service.rb b/app/services/merge_requests/after_create_service.rb index bc681397039..f0c85ae03c9 100644 --- a/app/services/merge_requests/after_create_service.rb +++ b/app/services/merge_requests/after_create_service.rb @@ -14,3 +14,5 @@ module MergeRequests end end end + +MergeRequests::AfterCreateService.prepend_if_ee('EE::MergeRequests::AfterCreateService') diff --git a/app/services/merge_requests/conflicts/list_service.rb b/app/services/merge_requests/conflicts/list_service.rb index c6b3a6a1a69..30a493e91ce 100644 --- a/app/services/merge_requests/conflicts/list_service.rb +++ b/app/services/merge_requests/conflicts/list_service.rb @@ -8,7 +8,7 @@ module MergeRequests def can_be_resolved_by?(user) return false unless merge_request.source_project - access = ::Gitlab::UserAccess.new(user, project: merge_request.source_project) + access = ::Gitlab::UserAccess.new(user, container: merge_request.source_project) access.can_push_to_branch?(merge_request.source_branch) end diff --git a/app/services/merge_requests/ff_merge_service.rb b/app/services/merge_requests/ff_merge_service.rb index b3896d61a78..79011094e88 100644 --- a/app/services/merge_requests/ff_merge_service.rb +++ b/app/services/merge_requests/ff_merge_service.rb @@ -22,6 +22,7 @@ module MergeRequests ff_merge rescue Gitlab::Git::PreReceiveError => e + Gitlab::ErrorTracking.track_exception(e, pre_receive_message: e.raw_message, merge_request_id: merge_request&.id) raise MergeError, e.message rescue StandardError => e raise MergeError, "Something went wrong during merge: #{e.message}" diff --git a/app/services/merge_requests/mergeability_check_service.rb b/app/services/merge_requests/mergeability_check_service.rb index d3d661a3b75..a3c39fa2e32 100644 --- a/app/services/merge_requests/mergeability_check_service.rb +++ b/app/services/merge_requests/mergeability_check_service.rb @@ -125,7 +125,7 @@ module MergeRequests end def update_diff_discussion_positions! - return if Feature.disabled?(:merge_ref_head_comments, merge_request.target_project) + return if Feature.disabled?(:merge_ref_head_comments, merge_request.target_project, default_enabled: true) Discussions::CaptureDiffNotePositionsService.new(merge_request).execute end diff --git a/app/services/merge_requests/pushed_branches_service.rb b/app/services/merge_requests/pushed_branches_service.rb index afcf0f7678a..bbe75305d92 100644 --- a/app/services/merge_requests/pushed_branches_service.rb +++ b/app/services/merge_requests/pushed_branches_service.rb @@ -9,7 +9,7 @@ module MergeRequests def execute return [] if branch_names.blank? - source_branches = project.source_of_merge_requests.opened + source_branches = project.source_of_merge_requests.open_and_closed .from_source_branches(branch_names).pluck(:source_branch) target_branches = project.merge_requests.opened diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb index 29e0c22b155..cf02158b629 100644 --- a/app/services/merge_requests/update_service.rb +++ b/app/services/merge_requests/update_service.rb @@ -105,7 +105,7 @@ module MergeRequests def handle_assignees_change(merge_request, old_assignees) create_assignee_note(merge_request, old_assignees) notification_service.async.reassigned_merge_request(merge_request, current_user, old_assignees) - todo_service.reassigned_issuable(merge_request, current_user, old_assignees) + todo_service.reassigned_assignable(merge_request, current_user, old_assignees) end def create_branch_change_note(issuable, branch_type, old_branch, new_branch) |