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
Tatuya Kamada
gitlab-ce
Commits
7a4d4685
Commit
7a4d4685
authored
Dec 09, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/mr-broken'
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parents
7b50965e
23522a9b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
32 deletions
+66
-32
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+18
-0
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-1
app/models/merge_request.rb
app/models/merge_request.rb
+4
-0
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+14
-11
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+25
-16
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+2
-2
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
7a4d4685
...
@@ -123,6 +123,24 @@ ul.content-list {
...
@@ -123,6 +123,24 @@ ul.content-list {
padding
:
10px
14px
;
padding
:
10px
14px
;
}
}
}
}
ul
.controls
{
list-style
:
none
;
li
{
float
:
left
;
padding-right
:
10px
;
.author_link
{
display
:
inline-block
;
.avatar-inline
{
margin-left
:
0
;
margin-right
:
0
;
}
}
}
}
}
}
}
}
...
...
app/helpers/ci_status_helper.rb
View file @
7a4d4685
...
@@ -58,7 +58,7 @@ module CiStatusHelper
...
@@ -58,7 +58,7 @@ module CiStatusHelper
def
render_ci_status
(
ci_commit
)
def
render_ci_status
(
ci_commit
)
link_to
ci_status_path
(
ci_commit
),
link_to
ci_status_path
(
ci_commit
),
class:
"c
#{
ci_status_color
(
ci_commit
)
}
"
,
class:
"c
#{
ci_status_color
(
ci_commit
)
}
"
,
title:
"Build
status:
#{
ci_status_label
(
ci_commit
)
}
"
,
title:
"Build
#{
ci_status_label
(
ci_commit
)
}
"
,
data:
{
toggle:
'tooltip'
,
placement:
'left'
}
do
data:
{
toggle:
'tooltip'
,
placement:
'left'
}
do
ci_status_icon
(
ci_commit
)
ci_status_icon
(
ci_commit
)
end
end
...
...
app/models/merge_request.rb
View file @
7a4d4685
...
@@ -509,4 +509,8 @@ class MergeRequest < ActiveRecord::Base
...
@@ -509,4 +509,8 @@ class MergeRequest < ActiveRecord::Base
def
ci_commit
def
ci_commit
@ci_commit
||=
source_project
.
ci_commit
(
last_commit
.
id
)
if
last_commit
&&
source_project
@ci_commit
||=
source_project
.
ci_commit
(
last_commit
.
id
)
if
last_commit
&&
source_project
end
end
def
broken?
self
.
commits
.
blank?
||
branch_missing?
||
cannot_be_merged?
end
end
end
app/views/projects/issues/_issue.html.haml
View file @
7a4d4685
...
@@ -6,23 +6,26 @@
...
@@ -6,23 +6,26 @@
.issue-title
.issue-title
%span
.issue-title-text
%span
.issue-title-text
=
link_to_gfm
issue
.
title
,
issue_path
(
issue
),
class:
"row_title"
=
link_to_gfm
issue
.
title
,
issue_path
(
issue
),
class:
"row_title"
.pull-right
.light
%ul
.controls
.light
-
if
issue
.
closed?
-
if
issue
.
closed?
%
span
%
li
CLOSED
CLOSED
-
if
issue
.
assignee
-
if
issue
.
assignee
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
%li
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
note_count
=
issue
.
notes
.
user
.
count
-
note_count
=
issue
.
notes
.
user
.
count
-
if
note_count
>
0
-
if
note_count
>
0
%li
=
link_to
issue_path
(
issue
)
+
"#notes"
do
=
link_to
issue_path
(
issue
)
+
"#notes"
do
=
icon
(
'comments'
)
=
icon
(
'comments'
)
=
note_count
=
note_count
-
else
-
else
%li
=
link_to
issue_path
(
issue
)
+
"#notes"
,
class:
"issue-no-comments"
do
=
link_to
issue_path
(
issue
)
+
"#notes"
,
class:
"issue-no-comments"
do
=
icon
(
'comments'
)
=
icon
(
'comments'
)
=
0
=
note_count
.issue-info
.issue-info
#{
issue
.
to_reference
}
·
#{
issue
.
to_reference
}
·
...
...
app/views/projects/merge_requests/_merge_request.html.haml
View file @
7a4d4685
...
@@ -2,31 +2,40 @@
...
@@ -2,31 +2,40 @@
.merge-request-title
.merge-request-title
%span
.merge-request-title-text
%span
.merge-request-title-text
=
link_to_gfm
merge_request
.
title
,
merge_request_path
(
merge_request
),
class:
"row_title"
=
link_to_gfm
merge_request
.
title
,
merge_request_path
(
merge_request
),
class:
"row_title"
.pull-right.light
%ul
.controls.light
-
if
merge_request
.
ci_commit
=
render_ci_status
(
merge_request
.
ci_commit
)
-
if
merge_request
.
merged?
-
if
merge_request
.
merged?
%
span
%
li
=
icon
(
'check'
)
=
icon
(
'check'
)
MERGED
MERGED
-
elsif
merge_request
.
closed?
-
elsif
merge_request
.
closed?
%
span
%
li
=
icon
(
'ban'
)
=
icon
(
'ban'
)
CLOSED
CLOSED
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
if
merge_request
.
ci_commit
%li
=
render_ci_status
(
merge_request
.
ci_commit
)
-
if
merge_request
.
open?
&&
merge_request
.
broken?
%li
=
link_to
merge_request_path
(
merge_request
),
class:
"has_tooltip"
,
title:
"Cannot be merged automatically"
,
data:
{
container:
'body'
}
do
=
icon
(
'exclamation-triangle'
)
-
if
merge_request
.
assignee
-
if
merge_request
.
assignee
%li
=
link_to_member
(
merge_request
.
source_project
,
merge_request
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
=
link_to_member
(
merge_request
.
source_project
,
merge_request
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
if
note_count
>
0
-
if
note_count
>
0
%li
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
do
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
do
=
icon
(
'comments'
)
=
icon
(
'comments'
)
=
note_count
=
note_count
-
else
-
else
%li
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
,
class:
"merge-request-no-comments"
do
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
,
class:
"merge-request-no-comments"
do
=
icon
(
'comments'
)
=
icon
(
'comments'
)
=
0
=
note_count
.merge-request-info
.merge-request-info
\##{merge_request.iid}
·
\##{merge_request.iid}
·
...
...
features/steps/dashboard/dashboard.rb
View file @
7a4d4685
...
@@ -12,7 +12,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
...
@@ -12,7 +12,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
end
step
'I should see "Shop" project CI status'
do
step
'I should see "Shop" project CI status'
do
expect
(
page
).
to
have_link
"Build s
tatus: s
kipped"
expect
(
page
).
to
have_link
"Build skipped"
end
end
step
'I should see last push widget'
do
step
'I should see last push widget'
do
...
...
features/steps/project/merge_requests.rb
View file @
7a4d4685
...
@@ -367,7 +367,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -367,7 +367,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step
'I should see merge request "Bug NS-05" with CI status'
do
step
'I should see merge request "Bug NS-05" with CI status'
do
page
.
within
".mr-list"
do
page
.
within
".mr-list"
do
expect
(
page
).
to
have_link
"Build
status:
pending"
expect
(
page
).
to
have_link
"Build pending"
end
end
end
end
...
...
spec/features/issues_spec.rb
View file @
7a4d4685
...
@@ -293,10 +293,10 @@ describe 'Issues', feature: true do
...
@@ -293,10 +293,10 @@ describe 'Issues', feature: true do
end
end
def
first_issue
def
first_issue
page
.
all
(
'ul.issues-list li'
).
first
.
text
page
.
all
(
'ul.issues-list
>
li'
).
first
.
text
end
end
def
last_issue
def
last_issue
page
.
all
(
'ul.issues-list li'
).
last
.
text
page
.
all
(
'ul.issues-list
>
li'
).
last
.
text
end
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