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
Léo-Paul Géneau
gitlab-ce
Commits
b3b4272c
Commit
b3b4272c
authored
Jul 03, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy up component
added api spec
parent
c1322ab9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
34 deletions
+17
-34
app/assets/javascripts/ide/components/merge_requests/info.vue
...assets/javascripts/ide/components/merge_requests/info.vue
+1
-34
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+8
-0
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+8
-0
No files found.
app/assets/javascripts/ide/components/merge_requests/info.vue
View file @
b3b4272c
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
Icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
timeago
from
'
../../../vue_shared/mixins/timeago
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
TitleComponent
from
'
../../../issue_show/components/title.vue
'
;
import
DescriptionComponent
from
'
../../../issue_show/components/description.vue
'
;
const
states
=
{
open
:
'
open
'
,
closed
:
'
closed
'
,
};
export
default
{
directives
:
{
tooltip
,
},
components
:
{
Icon
,
TitleComponent
,
DescriptionComponent
,
},
mixins
:
[
timeago
],
computed
:
{
...
mapGetters
([
'
currentMergeRequest
'
]),
isOpen
()
{
return
this
.
currentMergeRequest
.
state
===
states
.
open
;
},
isClosed
()
{
return
this
.
currentMergeRequest
.
state
===
states
.
closed
;
},
authorUsername
()
{
return
`@
${
this
.
currentMergeRequest
.
author
.
username
}
`
;
},
iconName
()
{
return
this
.
isOpen
?
'
issue-open-m
'
:
'
close
'
;
},
},
};
</
script
>
<
template
>
<div
class=
"ide-merge-request-info"
>
<div
class=
"detail-page-header"
>
<div
class=
"detail-page-header
sticky-top bg-white
"
>
<icon
name=
"git-merge"
class=
"align-self-center append-right-8"
...
...
@@ -64,13 +41,3 @@ export default {
</div>
</div>
</
template
>
<
style
scoped
>
.ide-merge-request-info
{
overflow
:
auto
;
}
.detail-page-header
{
line-height
:
initial
;
}
</
style
>
app/assets/stylesheets/pages/repo.scss
View file @
b3b4272c
...
...
@@ -1329,3 +1329,11 @@
line-height
:
16px
;
color
:
$gl-text-color-secondary
;
}
.ide-merge-request-info
{
overflow
:
auto
;
.detail-page-header
{
line-height
:
initial
;
}
}
spec/requests/api/merge_requests_spec.rb
View file @
b3b4272c
...
...
@@ -306,6 +306,14 @@ describe API::MergeRequests do
expect
(
json_response
[
'changes_count'
]).
to
eq
(
merge_request
.
merge_request_diff
.
real_size
)
end
it
'exposes description and title html'
do
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
?render_html=true"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
include
([
'title_html'
,
'description_html'
])
end
context
'merge_request_metrics'
do
before
do
merge_request
.
metrics
.
update!
(
merged_by:
user
,
...
...
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