lib/danger/ci_source/gitlab_ci.rb in danger-5.5.1 vs lib/danger/ci_source/gitlab_ci.rb in danger-5.5.2

- old
+ new

@@ -36,11 +36,11 @@ project_id = env["CI_PROJECT_ID"] base_commit = env["CI_COMMIT_SHA"] client = RequestSources::GitLab.new(nil, env).client merge_requests = client.merge_requests(project_id, state: :opened) - merge_request = merge_requests.auto_paginate.bsearch do |mr| - mr.sha >= base_commit + merge_request = merge_requests.auto_paginate.find do |mr| + mr.sha == base_commit end merge_request.nil? ? 0 : merge_request.iid end