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
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-08-22 11:01:11 +0300
committerShinya Maeda <shinya@gitlab.com>2017-09-03 17:49:10 +0300
commitbbe967abeba7be1db79e34439e74cd113c240b52 (patch)
treeb498f626149dc0e8ed541352fa9080e10a99fb34 /lib/gitlab/ci
parenteda34b1a1846a5d5b55cc127a32b0c7628580f25 (diff)
Add the rest of specs
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r--lib/gitlab/ci/stage/seed.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/gitlab/ci/stage/seed.rb b/lib/gitlab/ci/stage/seed.rb
index 2bc78b4f004..e19aae35a81 100644
--- a/lib/gitlab/ci/stage/seed.rb
+++ b/lib/gitlab/ci/stage/seed.rb
@@ -29,14 +29,10 @@ module Gitlab
ref: pipeline.ref,
tag: pipeline.tag,
trigger_request: trigger,
- protected: protected?)
+ protected: protected_ref?)
end
end
- def protected?
- @protected ||= project.protected_for?(pipeline.ref)
- end
-
def create!
pipeline.stages.create!(stage).tap do |stage|
builds_attributes = builds.map do |attributes|
@@ -48,6 +44,12 @@ module Gitlab
end
end
end
+
+ private
+
+ def protected_ref?
+ @protected_ref ||= project.protected_for?(pipeline.ref)
+ end
end
end
end