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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bd049e5e
Commit
bd049e5e
authored
Oct 21, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API:merge request show && list
parent
42abdf69
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
lib/api.rb
lib/api.rb
+1
-0
lib/api/entities.rb
lib/api/entities.rb
+6
-0
lib/api/merge_requests.rb
lib/api/merge_requests.rb
+31
-0
No files found.
lib/api.rb
View file @
bd049e5e
...
...
@@ -18,5 +18,6 @@ module Gitlab
mount
Issues
mount
Milestones
mount
Session
mount
MergeRequests
end
end
lib/api/entities.rb
View file @
bd049e5e
...
...
@@ -63,5 +63,11 @@ module Gitlab
class
SSHKey
<
Grape
::
Entity
expose
:id
,
:title
,
:key
end
class
MergeRequest
<
Grape
::
Entity
expose
:id
,
:target_branch
,
:source_branch
,
:project_id
,
:title
,
:closed
,
:merged
expose
:author
,
:assignee
,
using:
Entities
::
UserBasic
end
end
end
lib/api/merge_requests.rb
0 → 100644
View file @
bd049e5e
module
Gitlab
# Issues API
class
MergeRequests
<
Grape
::
API
before
{
authenticate!
}
resource
:projects
do
#list
get
":id/merge_requests"
do
project
=
current_user
.
projects
.
find
(
params
[
:id
])
present
project
.
merge_requests
,
with:
Entities
::
MergeRequest
end
#show
get
":id/merge_request/:merge_request_id"
do
project
=
current_user
.
projects
.
find
(
params
[
:id
])
present
project
.
merge_requests
.
find
(
params
[
:merge_request_id
]),
with:
Entities
::
MergeRequest
end
#create merge_request
post
":id/merge_requests"
do
end
#update merge_request
put
":id/merge_request/:merge_request_id"
do
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