diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-08-16 19:54:05 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-03 17:49:10 +0300 |
commit | e1ef436d1fd6419ce8a08c4ac33bf664786c80b0 (patch) | |
tree | dddd090cb598449df56a24204a40596d88b25fa4 /lib/gitlab/ci | |
parent | 0a7b3ae9f1a67645c798dfbfc60388c4c9cb5b95 (diff) |
Update application code by the db schema change
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/stage/seed.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/ci/stage/seed.rb b/lib/gitlab/ci/stage/seed.rb index f81f9347b4d..d9ac46908b0 100644 --- a/lib/gitlab/ci/stage/seed.rb +++ b/lib/gitlab/ci/stage/seed.rb @@ -28,10 +28,15 @@ module Gitlab attributes.merge(project: project, ref: pipeline.ref, tag: pipeline.tag, - trigger_request: trigger) + trigger_request: trigger + protected: protected?) 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| |