Commit 3508948d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add a new relation between a stage and related bridges

parent cfbcc191
......@@ -14,6 +14,7 @@ module Ci
has_many :statuses, class_name: 'CommitStatus', foreign_key: :stage_id
has_many :builds, foreign_key: :stage_id
has_many :bridges, foreign_key: :stage_id
with_options unless: :importing? do
validates :project, presence: true
......
......@@ -41,7 +41,7 @@ module Gitlab
::Ci::Stage.new(attributes).tap do |stage|
seeds.each do |seed|
if seed.bridge?
stage.statuses << seed.to_resource
stage.bridges << seed.to_resource
else
stage.builds << seed.to_resource
end
......
......@@ -138,6 +138,7 @@ stages:
- pipeline
- statuses
- builds
- bridges
statuses:
- project
- pipeline
......
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