Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-01-16 22:51:41 +0300
committerMatija Čupić <matteeyah@gmail.com>2019-01-16 23:38:17 +0300
commit09d8c77ab2338593a303d73360dc9e5db706394b (patch)
treeabd28b5dfc33168c45703256fe7d19647d268e0e /lib
parentdedaec13a57abdbeaded37c1ae9526a4f3d82e8b (diff)
Prevent checking protected_ref? for ambiguous refs
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/pipeline/chain/command.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/command.rb b/lib/gitlab/ci/pipeline/chain/command.rb
index e62d547d862..e0172e56f56 100644
--- a/lib/gitlab/ci/pipeline/chain/command.rb
+++ b/lib/gitlab/ci/pipeline/chain/command.rb
@@ -53,6 +53,8 @@ module Gitlab
end
def protected_ref?
+ return if ambiguous_ref?
+
strong_memoize(:protected_ref) do
project.protected_for?(origin_ref)
end