summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-07-18 20:24:25 +0000
committerDouwe Maan <douwe@gitlab.com>2016-07-18 20:24:25 +0000
commit3d9c7a0e215355823c182f9302547a0e8e0a1b56 (patch)
tree2dc7c2270ce6ffde01ec4dea8a0b9ea140e048b6 /app/models/ci
parentc367fa8eb773a049ffdfe4735d42254ed808fef2 (diff)
parent4ff3ef6f925633f66a120c4844d93542bb1d6e2a (diff)
downloadgitlab-ce-3d9c7a0e215355823c182f9302547a0e8e0a1b56.tar.gz
Merge branch '19420-render-only-commit-title' into 'master' 19889-shortcuts-modal-is-broken
Render only commit title ## What does this MR do? Render only commit title in builds ## Why was this MR needed? Better readability ## What are the relevant issue numbers? Closes #19420 ## Screenshots (if relevant) ![after](/uploads/fcdd59d74a0f91f6ac847f7f02d5f07f/after.png)![before](/uploads/71ca6dabf31452a1a8dfb15ecb8860c5/before.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) cc: @kradydal @yorickpeterse @grzesiek @tmaczukin @dzaporozhets [@tomash](https://github.com/tomash) [@chastell](https://github.com/chastell) this is connected to closed MR [!5109](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5109) See merge request !5131
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/pipeline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index b468434866b..a65a826536d 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -51,6 +51,10 @@ module Ci
commit.try(:message)
end
+ def git_commit_title
+ commit.try(:title)
+ end
+
def short_sha
Ci::Pipeline.truncate_sha(sha)
end