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

Support merge_request pipeline ref types

parent 1b28a2c1
...@@ -389,7 +389,7 @@ module Ci ...@@ -389,7 +389,7 @@ module Ci
end end
def branch? def branch?
!tag? && !merge_request? super && !merge_request?
end end
def stuck? def stuck?
...@@ -721,14 +721,10 @@ module Ci ...@@ -721,14 +721,10 @@ module Ci
end end
def git_ref 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 Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
elsif tag?
Gitlab::Git::TAG_REF_PREFIX + ref.to_s
else else
raise ArgumentError, 'Invalid pipeline type!' super
end end
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