Skip to content

Commit 2016f36

Browse files
committed
Merge remote-tracking branch 'origin/master' into cs-warn-on-failure
2 parents 737e522 + 79b02e4 commit 2016f36

33 files changed

+283
-105
lines changed

CHANGELOG

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Please view this file on the master branch, on stable branches it's out of date.
22
v 8.11.0 (unreleased)
33
- Fix of 'Commits being passed to custom hooks are already reachable when using the UI'
4+
- Limit git rev-list output count to one in forced push check
45

56
v 8.10.0 (unreleased)
67
- Fix profile activity heatmap to show correct day name (eanplatter)
@@ -35,6 +36,7 @@ v 8.10.0 (unreleased)
3536
- Added day name to contribution calendar tooltips
3637
- Make images fit to the size of the viewport !4810
3738
- Fix check for New Branch button on Issue page !4630 (winniehell)
39+
- Fix GFM autocomplete not working on wiki pages
3840
- Fix MR-auto-close text added to description. !4836
3941
- Support U2F devices in Firefox. !5177
4042
- Fix issue, preventing users w/o push access to sort tags !5105 (redetection)

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ GEM
578578
railties (>= 4.2.0, < 5.1)
579579
rinku (2.0.0)
580580
rotp (2.1.2)
581-
rouge (2.0.3)
581+
rouge (2.0.5)
582582
rqrcode (0.7.0)
583583
chunky_png
584584
rqrcode-rails3 (0.1.7)

app/assets/stylesheets/framework/buttons.scss

+18
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@
4949
border-color: $border-dark;
5050
color: $color;
5151
}
52+
53+
svg {
54+
55+
path {
56+
fill: $color;
57+
}
58+
59+
use {
60+
stroke: $color;
61+
}
62+
}
5263
}
5364

5465
@mixin btn-green {
@@ -173,6 +184,13 @@
173184
.caret {
174185
margin-left: 5px;
175186
}
187+
188+
svg {
189+
height: 15px;
190+
width: auto;
191+
position: relative;
192+
top: 2px;
193+
}
176194
}
177195

178196
.btn-lg {

app/assets/stylesheets/framework/sidebar.scss

+4
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ header.header-pinned-nav {
198198

199199
.sidebar-collapsed-icon {
200200
cursor: pointer;
201+
202+
.btn {
203+
background-color: $gray-light;
204+
}
201205
}
202206
}
203207

app/assets/stylesheets/pages/issuable.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@
122122

123123
button {
124124
float: right;
125-
padding: 3px 5px;
125+
padding: 1px 5px;
126+
background-color: $gray-light;
126127
}
127128
}
128129

app/assets/stylesheets/pages/issues.scss

+8
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ form.edit-issue {
7878
}
7979
}
8080

81+
.merge-request-ci-status {
82+
svg {
83+
margin-right: 4px;
84+
position: relative;
85+
top: 1px;
86+
}
87+
}
88+
8189
@media (max-width: $screen-xs-max) {
8290
.issue-btn-group {
8391
width: 100%;

app/assets/stylesheets/pages/merge_requests.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060
.ci_widget {
6161
border-bottom: 1px solid #eef0f2;
6262

63-
i {
63+
svg {
6464
margin-right: 4px;
65+
position: relative;
66+
top: 1px;
6567
}
6668

6769
&.ci-success {
@@ -204,6 +206,16 @@
204206

205207
.merge-request-title {
206208
margin-bottom: 2px;
209+
210+
.ci-status-link {
211+
212+
svg {
213+
height: 16px;
214+
width: 16px;
215+
position: relative;
216+
top: 3px;
217+
}
218+
}
207219
}
208220
}
209221

app/assets/stylesheets/pages/pipelines.scss

+17
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@
4949

5050
.commit-link {
5151

52+
.ci-status {
53+
54+
svg {
55+
top: 1px;
56+
margin-right: 0;
57+
}
58+
}
59+
5260
a:hover {
5361
text-decoration: none;
5462
}
@@ -124,6 +132,15 @@
124132
}
125133
}
126134

135+
.stage-cell {
136+
137+
svg {
138+
height: 18px;
139+
width: 18px;
140+
vertical-align: middle;
141+
}
142+
}
143+
127144
.duration,
128145
.finished-at {
129146
color: $table-text-gray;

app/assets/stylesheets/pages/projects.scss

+16
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@
129129
color: $layout-link-gray;
130130
}
131131

132+
svg {
133+
134+
path {
135+
fill: $layout-link-gray;
136+
}
137+
138+
use {
139+
stroke: $layout-link-gray;
140+
}
141+
}
142+
132143
.fa-caret-down {
133144
margin-left: 3px;
134145
}
@@ -486,6 +497,11 @@ pre.light-well {
486497
> span {
487498
margin-left: 10px;
488499
}
500+
501+
svg {
502+
position: relative;
503+
top: 2px;
504+
}
489505
}
490506
}
491507

app/assets/stylesheets/pages/status.scss

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
color: $blue-normal;
4343
border-color: $blue-normal;
4444
}
45+
46+
svg {
47+
height: 13px;
48+
width: 13px;
49+
position: relative;
50+
top: 1px;
51+
margin: 0 3px;
52+
}
4553
}
4654

4755
.ci-status-icon-success {
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.tag-buttons {
2+
line-height: 40px;
3+
4+
.btn:not(.dropdown-toggle) {
5+
margin-left: 10px;
6+
}
7+
}

app/helpers/ci_status_helper.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ def ci_icon_for_status(status)
2929
icon_name =
3030
case status
3131
when 'success'
32-
'check'
32+
'icon_status_success'
3333
when 'success_with_warnings'
34-
'exclamation-triangle'
34+
'icon_status_warning'
3535
when 'failed'
36-
'close'
36+
'icon_status_failed'
3737
when 'pending'
38-
'clock-o'
38+
'icon_status_pending'
3939
when 'running'
40-
'spinner'
40+
'icon_status_running'
4141
else
42-
'circle'
42+
'icon_status_cancel'
4343
end
4444

45-
icon(icon_name + ' fw')
45+
custom_icon(icon_name)
4646
end
4747

4848
def render_commit_status(commit, tooltip_placement: 'auto left', cssclass: '')

app/helpers/time_helper.rb

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
module TimeHelper
2-
def duration_in_words(finished_at, started_at)
3-
if finished_at && started_at
4-
interval_in_seconds = finished_at.to_i - started_at.to_i
5-
elsif started_at
6-
interval_in_seconds = Time.now.to_i - started_at.to_i
7-
end
8-
9-
time_interval_in_words(interval_in_seconds)
10-
end
11-
122
def time_interval_in_words(interval_in_seconds)
133
minutes = interval_in_seconds / 60
144
seconds = interval_in_seconds - minutes * 60
@@ -25,9 +15,19 @@ def date_from_to(from, to)
2515
end
2616

2717
def duration_in_numbers(finished_at, started_at)
28-
diff_in_seconds = finished_at.to_i - started_at.to_i
29-
time_format = diff_in_seconds < 1.hour ? "%M:%S" : "%H:%M:%S"
18+
interval = interval_in_seconds(started_at, finished_at)
19+
time_format = interval < 1.hour ? "%M:%S" : "%H:%M:%S"
3020

31-
Time.at(diff_in_seconds).utc.strftime(time_format)
21+
Time.at(interval).utc.strftime(time_format)
22+
end
23+
24+
private
25+
26+
def interval_in_seconds(started_at, finished_at = nil)
27+
if started_at && finished_at
28+
finished_at.to_i - started_at.to_i
29+
elsif started_at
30+
Time.now.to_i - started_at.to_i
31+
end
3232
end
3333
end

app/models/user.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ def projects_union(min_access_level = nil)
854854
groups.joins(:shared_projects).select(:project_id)]
855855

856856
if min_access_level
857-
scope = { access_level: Gitlab::Access.values.select { |access| access >= min_access_level } }
857+
scope = { access_level: Gitlab::Access.all_values.select { |access| access >= min_access_level } }
858858
relations = [relations.shift] + relations.map { |relation| relation.where(members: scope) }
859859
end
860860

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- project = @target_project || @project
2+
- noteable_class = @noteable.class if @noteable.present?
23

3-
- if @noteable
4-
:javascript
5-
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: @noteable.class, type_id: params[:id])}"
6-
GitLab.GfmAutoComplete.cachedData = undefined;
7-
GitLab.GfmAutoComplete.setup();
4+
:javascript
5+
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: noteable_class, type_id: params[:id])}"
6+
GitLab.GfmAutoComplete.cachedData = undefined;
7+
GitLab.GfmAutoComplete.setup();

app/views/projects/builds/_sidebar.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
- if @build.duration
5050
%p.build-detail-row
5151
%span.build-light-text Duration:
52-
#{duration_in_words(@build.finished_at, @build.started_at)}
52+
= time_interval_in_words(@build.duration)
5353
- if @build.finished_at
5454
%p.build-detail-row
5555
%span.build-light-text Finished:

app/views/projects/buttons/_fork.html.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
- if current_user && can?(current_user, :fork_project, @project)
33
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
44
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn has-tooltip' do
5-
= icon('code-fork fw')
5+
= custom_icon('icon_fork')
66
Fork
77
%div.count-with-arrow
88
%span.arrow
99
%span.count
1010
= @project.forks_count
1111
- else
1212
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn has-tooltip' do
13-
= icon('code-fork fw')
13+
= custom_icon('icon_fork')
1414
Fork
1515
%div.count-with-arrow
1616
%span.arrow

app/views/projects/ci/pipelines/_pipeline.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
- stages_status = pipeline.statuses.latest.stages_status
3737
- stages.each do |stage|
38-
%td
38+
%td.stage-cell
3939
- status = stages_status[stage]
4040
- tooltip = "#{stage.titleize}: #{status || 'not found'}"
4141
- if status

app/views/projects/forks/index.html.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
- if current_user && can?(current_user, :fork_project, @project)
3232
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
3333
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do
34-
= icon('code-fork fw')
34+
= custom_icon('icon_fork')
3535
Fork
3636
- else
3737
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-new' do
38-
= icon('code-fork fw')
38+
= custom_icon('icon_fork')
3939
Fork
4040

4141

app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
%td.duration
5252
- if generic_commit_status.duration
5353
= icon("clock-o")
54-
#{duration_in_words(generic_commit_status.finished_at, generic_commit_status.started_at)}
54+
= time_interval_in_words(generic_commit_status.duration)
5555

5656
%td.timestamp
5757
- if generic_commit_status.finished_at

0 commit comments

Comments
 (0)