diff options
Diffstat (limited to 'app/services/merge_requests/refresh_service.rb')
-rw-r--r-- | app/services/merge_requests/refresh_service.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb index 3a4e3ba38fd..f7a0f90b95f 100644 --- a/app/services/merge_requests/refresh_service.rb +++ b/app/services/merge_requests/refresh_service.rb @@ -294,14 +294,14 @@ module MergeRequests @source_merge_requests ||= merge_requests_for(@push.branch_name) end - # rubocop: disable CodeReuse/ActiveRecord def merge_requests_for_forks @merge_requests_for_forks ||= - MergeRequest.opened - .where(source_branch: @push.branch_name, source_project: @project) - .where.not(target_project: @project) + MergeRequest + .opened + .from_project(project) + .from_source_branches(@push.branch_name) + .from_fork end - # rubocop: enable CodeReuse/ActiveRecord end end |