summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-14 16:29:15 +0000
committerDouwe Maan <douwe@gitlab.com>2016-01-14 16:29:15 +0000
commitba42b03348056e511df8484a8b342c7a2129c4f4 (patch)
tree3a7325630be2c373103a9e11acb30ce22e859e56 /app/models
parent0eef82761fe3a100c4f22c7a1abea3a34dc76edf (diff)
parent2c7d9cfa7dbd4e7716793bdb1ee9e081f13c33b2 (diff)
downloadgitlab-ce-ba42b03348056e511df8484a8b342c7a2129c4f4.tar.gz
Merge branch 'ci/api-builds' into 'master'
Add builds API References #4264 See merge request !2207
Diffstat (limited to 'app/models')
-rw-r--r--app/models/commit_status.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 4ce9b998dfc..66e0502fc0c 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