diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 11:33:01 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 11:33:01 +0200 |
commit | 8657d5dd8af6c365b41d7c2997e6e5c9e18e8241 (patch) | |
tree | 3d7918aafff40e28f29e7c8bfaaa421c8a75ec17 /app | |
parent | d3814ad69876c69cdab574e2958368f2ab648171 (diff) | |
download | gitlab-ce-8657d5dd8af6c365b41d7c2997e6e5c9e18e8241.tar.gz |
Do not implement CI/CD job to stage association yet
Diffstat (limited to 'app')
-rw-r--r-- | app/models/commit_status.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index efb5cbd9d41..d7418a07177 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -38,22 +38,15 @@ class CommitStatus < ActiveRecord::Base scope :retried_ordered, -> { retried.ordered.includes(project: :namespace) } scope :after_stage, -> (index) { where('stage_idx > ?', index) } - ## - # TODO, we will change this to `belongs_to :stage` when we phase out - # `ci_builds.stage` attribute and migrate `ci_builds.stage_id` reference in - # one of upcoming releases. - # - belongs_to :stage_entity, foreign_key: :stage_id, class_name: 'Ci::Stage' - state_machine :status do - event :enqueue do - transition [:created, :skipped, :manual] => :pending - end - event :process do transition [:skipped, :manual] => :created end + event :enqueue do + transition [:created, :skipped, :manual] => :pending + end + event :run do transition pending: :running end |