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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
e69a7b95
Commit
e69a7b95
authored
May 03, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always show latest pipeline info in commit box
parent
98ae016a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
app/models/commit.rb
app/models/commit.rb
+1
-1
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+9
-8
changelogs/unreleased/always-show-latest-pipeline-in-commit-box.yml
.../unreleased/always-show-latest-pipeline-in-commit-box.yml
+4
-0
No files found.
app/models/commit.rb
View file @
e69a7b95
...
...
@@ -237,7 +237,7 @@ class Commit
end
def
latest_pipeline
pipelines
.
last
@latest_pipeline
||=
pipelines
.
last
end
def
status
(
ref
=
nil
)
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
e69a7b95
...
...
@@ -61,19 +61,20 @@
%span
.commit-info.branches
%i
.fa.fa-spinner.fa-spin
-
if
@commit
.
status
-
if
@commit
.
latest_pipeline
-
latest_pipeline
=
@commit
.
latest_pipeline
.well-segment.pipeline-info
.status-icon-container
{
class:
"ci-status-icon-#{@commit.status}"
}
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
@commit
.
latest_pipeline
.
id
)
do
=
ci_icon_for_status
(
@commit
.
status
)
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
latest_pipeline
.
id
)
do
=
ci_icon_for_status
(
latest_pipeline
.
status
)
Pipeline
=
link_to
"#
#{
@commit
.
latest_pipeline
.
id
}
"
,
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
@commit
.
latest_pipeline
.
id
),
class:
"monospace"
=
ci_label_for_status
(
@commit
.
status
)
-
if
@commit
.
latest_pipeline
.
stages
.
any?
=
link_to
"#
#{
latest_pipeline
.
id
}
"
,
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
latest_pipeline
.
id
),
class:
"monospace"
=
ci_label_for_status
(
latest_pipeline
.
status
)
-
if
latest_pipeline
.
stages
.
any?
.mr-widget-pipeline-graph
=
render
'shared/mini_pipeline_graph'
,
pipeline:
@commit
.
latest_pipeline
,
klass:
'js-commit-pipeline-graph'
=
render
'shared/mini_pipeline_graph'
,
pipeline:
latest_pipeline
,
klass:
'js-commit-pipeline-graph'
in
=
time_interval_in_words
@commit
.
pipelines
.
total_
duration
=
time_interval_in_words
latest_pipeline
.
duration
:javascript
$
(
"
.commit-info.branches
"
).
load
(
"
#{
branches_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
}
"
);
changelogs/unreleased/always-show-latest-pipeline-in-commit-box.yml
0 → 100644
View file @
e69a7b95
---
title
:
Always show the latest pipeline information in the commit box
merge_request
:
11038
author
:
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