diff options
Diffstat (limited to 'app/models/ci/bridge.rb')
-rw-r--r-- | app/models/ci/bridge.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb index 58c26e8c806..1697067f633 100644 --- a/app/models/ci/bridge.rb +++ b/app/models/ci/bridge.rb @@ -35,6 +35,10 @@ module Ci end end + event :pending do + transition all => :pending + end + event :manual do transition all => :manual end @@ -48,6 +52,14 @@ module Ci raise NotImplementedError end + def self.with_preloads + preload( + :metadata, + downstream_pipeline: [project: [:route, { namespace: :route }]], + project: [:namespace] + ) + end + def schedule_downstream_pipeline! raise InvalidBridgeTypeError unless downstream_project |