diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2015-10-15 11:35:57 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2015-10-15 11:35:57 +0000 |
commit | daccc54d25a5acfd089e02fd7387ed14f0a3a629 (patch) | |
tree | 23022a603117e114ea608c7fa3e842a615f8faf6 /app/models/commit_status.rb | |
parent | 524b3db30ca53449c13cb6bb9a518cfc2c0cacf7 (diff) | |
parent | 9fa209e1d8748b1eb1ef041bb1c40d30914f2815 (diff) | |
download | gitlab-ce-daccc54d25a5acfd089e02fd7387ed14f0a3a629.tar.gz |
Merge branch 'builds-view' into 'master'
Added builds view
![Screen_Shot_2015-10-13_at_19.02.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/95bb3a7d9d603678fdd077558637045d/Screen_Shot_2015-10-13_at_19.02.48.png)
/cc @dzaporozhets @vsizov
See merge request !1593
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 92905c618eb..0b71838d515 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -16,6 +16,7 @@ class CommitStatus < ActiveRecord::Base scope :success, -> { where(status: 'success') } scope :failed, -> { where(status: 'failed') } scope :running_or_pending, -> { where(status:[:running, :pending]) } + scope :finished, -> { where(status:[:success, :failed, :canceled]) } scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :ref)) } scope :ordered, -> { order(:ref, :stage_idx, :name) } scope :for_ref, ->(ref) { where(ref: ref) } |