diff options
Diffstat (limited to 'app/services/merge_requests/base_service.rb')
-rw-r--r-- | app/services/merge_requests/base_service.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/merge_requests/base_service.rb b/app/services/merge_requests/base_service.rb index a726dd98697..4f4c1c77ec3 100644 --- a/app/services/merge_requests/base_service.rb +++ b/app/services/merge_requests/base_service.rb @@ -56,12 +56,18 @@ module MergeRequests def pipeline_merge_requests(pipeline) merge_requests_for(pipeline.ref, pipeline.sha).each do |merge_request| + next unless pipeline == merge_request.pipeline + yield merge_request end end def commit_status_merge_requests(commit_status) merge_requests_for(commit_status.ref, commit_status.sha).each do |merge_request| + pipeline = merge_request.pipeline + next unless pipeline + next unless pipeline.sha == commit_status.sha + yield merge_request end end |