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
e241fe6b
Commit
e241fe6b
authored
Jul 04, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added API docs
CHANGELOG improved comments in API code improved spec description
parent
828b9772
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
changelogs/unreleased/ide-merge-request-info.yml
changelogs/unreleased/ide-merge-request-info.yml
+5
-0
doc/api/merge_requests.md
doc/api/merge_requests.md
+1
-0
lib/api/merge_requests.rb
lib/api/merge_requests.rb
+1
-1
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+1
-1
No files found.
changelogs/unreleased/ide-merge-request-info.yml
0 → 100644
View file @
e241fe6b
---
title
:
Display merge request title & description in Web IDE
merge_request
:
author
:
type
:
added
doc/api/merge_requests.md
View file @
e241fe6b
...
@@ -358,6 +358,7 @@ Parameters:
...
@@ -358,6 +358,7 @@ Parameters:
-
`id`
(required) - The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user
-
`id`
(required) - The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user
-
`merge_request_iid`
(required) - The internal ID of the merge request
-
`merge_request_iid`
(required) - The internal ID of the merge request
-
`render_html`
(optional) - If
`true`
response includes rendered HTML for title and description
```
json
```
json
{
{
...
...
lib/api/merge_requests.rb
View file @
e241fe6b
...
@@ -232,7 +232,7 @@ module API
...
@@ -232,7 +232,7 @@ module API
params
do
params
do
requires
:merge_request_iid
,
type:
Integer
,
desc:
'The IID of a merge request'
requires
:merge_request_iid
,
type:
Integer
,
desc:
'The IID of a merge request'
optional
:render_html
,
type:
Boolean
,
desc:
'Returns the description and title rendered
html
'
optional
:render_html
,
type:
Boolean
,
desc:
'Returns the description and title rendered
HTML
'
end
end
desc
'Get a single merge request'
do
desc
'Get a single merge request'
do
success
Entities
::
MergeRequest
success
Entities
::
MergeRequest
...
...
spec/requests/api/merge_requests_spec.rb
View file @
e241fe6b
...
@@ -306,7 +306,7 @@ describe API::MergeRequests do
...
@@ -306,7 +306,7 @@ 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
it
'exposes description and title html
when render_html is true
'
do
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
user
),
render_html:
true
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
user
),
render_html:
true
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
...
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