Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
fda1d011
Commit
fda1d011
authored
Jul 11, 2016
by
ubudzisz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add git-commit-title-method into pipeline model and modify view
add git-commit-title-method into tests
parent
af1a6f05
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+4
-0
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
spec/views/projects/builds/show.html.haml_spec.rb
spec/views/projects/builds/show.html.haml_spec.rb
+9
-0
No files found.
app/models/ci/pipeline.rb
View file @
fda1d011
...
...
@@ -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
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
fda1d011
...
...
@@ -96,7 +96,7 @@
.title
Commit title
%p
.build-light-text.append-bottom-0
#{
@build
.
pipeline
.
commit
.
try
(
:title
)
}
#{
@build
.
pipeline
.
git_commit_title
}
-
if
@build
.
tags
.
any?
.block
...
...
spec/views/projects/builds/show.html.haml_spec.rb
View file @
fda1d011
...
...
@@ -22,6 +22,10 @@ describe 'projects/builds/show' do
it
'does not show retry button'
do
expect
(
rendered
).
not_to
have_link
(
'Retry'
)
end
it
'shows commit title'
do
expect
(
rendered
).
to
have_text
(
@git_commit_title
)
end
end
context
'when build is not running'
do
...
...
@@ -33,5 +37,10 @@ describe 'projects/builds/show' do
it
'shows retry button'
do
expect
(
rendered
).
to
have_link
(
'Retry'
)
end
it
'shows commit title'
do
expect
(
rendered
).
to
have_text
(
@git_commit_title
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment