summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-03-17 10:40:19 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-03-17 10:40:19 +0000
commitb5c80f99665f3aa9316b8667ec0fca640f3844d0 (patch)
tree3ebdd91270e27369beec13518eb56aace8763f19 /app/models/commit.rb
parent6fb6632110ccec9c7ad64217647e17a29bdd66e3 (diff)
parent4bf4612cfbe73845391375bf721592426d7b4181 (diff)
downloadgitlab-ce-b5c80f99665f3aa9316b8667ec0fca640f3844d0.tar.gz
Merge branch 'master' into 27574-pipelines-empty-state27574-pipelines-empty-state
* master: (209 commits) Fix Slack link when on notify Use Enumerable#index_by where possible Protect against unknown emojis in frequently used list Fix config option to disable Prometheus Fix double click token name fix describe block to make the karma reporter happy removes n+1 query from tags and branches indexes Fix broken links limit lines to 80 chars Add prometheus memory requirements, include additional detail on disabling prometheus in docs. Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes Expand on the good changelog/bad changelog documentation examples Add policy for closing stale merge requests Fix spec Use code icon for Raw Fix spec Add copy button to blob header and use icon for Raw button Fix archive prefix bug for refs containing dots Include routes when loading user projects Fixed search not working in issue boards modal Document a New Branch feature for Bare Projects ...
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 0a18986ef26..6ea5b1ae51f 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -231,6 +231,10 @@ class Commit
project.pipelines.where(sha: sha)
end
+ def latest_pipeline
+ pipelines.last
+ end
+
def status(ref = nil)
@statuses ||= {}