Commit 6cd09652 authored by Matija Čupić's avatar Matija Čupić

Support merge_request pipeline ref types

parent 1b28a2c1
......@@ -389,7 +389,7 @@ module Ci
end
def branch?
!tag? && !merge_request?
super && !merge_request?
end
def stuck?
......@@ -721,14 +721,10 @@ module Ci
end
def git_ref
if branch?
if merge_request?
Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
elsif merge_request?
Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
elsif tag?
Gitlab::Git::TAG_REF_PREFIX + ref.to_s
else
raise ArgumentError, 'Invalid pipeline type!'
super
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment