diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-23 16:46:36 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-23 16:53:11 +0300 |
commit | ad337a781873e3775190e990b9cea0177147f958 (patch) | |
tree | 3cb622b8ac821e81022ce74a33041b88b50555d2 /app/models/build.rb | |
parent | 3825fac65ba2e36620f7d50a8e52fc242ac0d710 (diff) | |
download | gitlab-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.rb | 1 |
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 |