summaryrefslogtreecommitdiff
path: root/app/models/build.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-06-23 16:46:36 +0300
committerValery Sizov <vsv2711@gmail.com>2015-06-23 16:53:11 +0300
commitad337a781873e3775190e990b9cea0177147f958 (patch)
tree3cb622b8ac821e81022ce74a33041b88b50555d2 /app/models/build.rb
parent3825fac65ba2e36620f7d50a8e52fc242ac0d710 (diff)
downloadgitlab-ci-cancel_commit.tar.gz
Ability to cancel all builds in the commit at oncecancel_commit
Diffstat (limited to 'app/models/build.rb')
-rw-r--r--app/models/build.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/build.rb b/app/models/build.rb
index 2ffb80c..6124c8f 100644
--- a/app/models/build.rb
+++ b/app/models/build.rb
@@ -32,6 +32,7 @@ class Build < ActiveRecord::Base
scope :success, ->() { where(status: "success") }
scope :failed, ->() { where(status: "failed") }
scope :unstarted, ->() { where(runner_id: nil) }
+ scope :running_or_pending, ->() { where(status:[:running, :pending]) }
acts_as_taggable