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
Boxiang Sun
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
Hide 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
>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
{
mapGetters
}
from
'
vuex
'
;
import
Icon
from
'
../../../vue_shared/components/icon.vue
'
;
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
TitleComponent
from
'
../../../issue_show/components/title.vue
'
;
import
DescriptionComponent
from
'
../../../issue_show/components/description.vue
'
;
import
DescriptionComponent
from
'
../../../issue_show/components/description.vue
'
;
const
states
=
{
open
:
'
open
'
,
closed
:
'
closed
'
,
};
export
default
{
export
default
{
directives
:
{
tooltip
,
},
components
:
{
components
:
{
Icon
,
Icon
,
TitleComponent
,
TitleComponent
,
DescriptionComponent
,
DescriptionComponent
,
},
},
mixins
:
[
timeago
],
computed
:
{
computed
:
{
...
mapGetters
([
'
currentMergeRequest
'
]),
...
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
>
</
script
>
<
template
>
<
template
>
<div
class=
"ide-merge-request-info"
>
<div
class=
"ide-merge-request-info"
>
<div
class=
"detail-page-header"
>
<div
class=
"detail-page-header
sticky-top bg-white
"
>
<icon
<icon
name=
"git-merge"
name=
"git-merge"
class=
"align-self-center append-right-8"
class=
"align-self-center append-right-8"
...
@@ -64,13 +41,3 @@ export default {
...
@@ -64,13 +41,3 @@ export default {
</div>
</div>
</div>
</div>
</
template
>
</
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 @@
...
@@ -1329,3 +1329,11 @@
line-height
:
16px
;
line-height
:
16px
;
color
:
$gl-text-color-secondary
;
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
...
@@ -306,6 +306,14 @@ describe API::MergeRequests do
expect
(
json_response
[
'changes_count'
]).
to
eq
(
merge_request
.
merge_request_diff
.
real_size
)
expect
(
json_response
[
'changes_count'
]).
to
eq
(
merge_request
.
merge_request_diff
.
real_size
)
end
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
context
'merge_request_metrics'
do
before
do
before
do
merge_request
.
metrics
.
update!
(
merged_by:
user
,
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