diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-14 14:59:04 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-14 14:59:04 +0100 |
commit | 2c7d9cfa7dbd4e7716793bdb1ee9e081f13c33b2 (patch) | |
tree | 4430479ebd90419dac607a90d24242ee78873e1c /app/models/commit_status.rb | |
parent | 405b82af230921db7b1510183063b126ef908e46 (diff) | |
download | gitlab-ce-2c7d9cfa7dbd4e7716793bdb1ee9e081f13c33b2.tar.gz |
Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatusci/api-builds
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index ff479493474..de1e3eb7eaf 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -56,6 +56,8 @@ class CommitStatus < ActiveRecord::Base scope :ordered, -> { order(:ref, :stage_idx, :name) } scope :for_ref, ->(ref) { where(ref: ref) } + AVAILABLE_STATUSES = ['pending', 'running', 'success', 'failed', 'canceled'] + state_machine :status, initial: :pending do event :run do transition pending: :running |