2cf7f09b1e
This reverts commit 530f5158e2
.
See !4892.
Signed-off-by: Rémy Coutable <remy@rymai.me>
18 lines
422 B
Ruby
18 lines
422 B
Ruby
module Gitlab
|
|
module Checks
|
|
class MatchingMergeRequest
|
|
def initialize(newrev, branch_name, project)
|
|
@newrev = newrev
|
|
@branch_name = branch_name
|
|
@project = project
|
|
end
|
|
|
|
def match?
|
|
@project.merge_requests
|
|
.with_state(:locked)
|
|
.where(in_progress_merge_commit_sha: @newrev, target_branch: @branch_name)
|
|
.exists?
|
|
end
|
|
end
|
|
end
|
|
end
|