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
81f2a9e5
Commit
81f2a9e5
authored
Dec 15, 2015
by
Kirill Skachkov
Committed by
Rémy Coutable
Feb 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: Allow to set or update a merge-request's milestone
parent
9fdd605f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
CHANGELOG
CHANGELOG
+1
-0
doc/api/merge_requests.md
doc/api/merge_requests.md
+2
-0
lib/api/merge_requests.rb
lib/api/merge_requests.rb
+4
-2
No files found.
CHANGELOG
View file @
81f2a9e5
...
@@ -31,6 +31,7 @@ v 8.5.0 (unreleased)
...
@@ -31,6 +31,7 @@ v 8.5.0 (unreleased)
- Prevent parse error when name of project ends with .atom and prevent path issues
- Prevent parse error when name of project ends with .atom and prevent path issues
- Mark inline difference between old and new paths when a file is renamed
- Mark inline difference between old and new paths when a file is renamed
- Support Akismet spam checking for creation of issues via API (Stan Hu)
- Support Akismet spam checking for creation of issues via API (Stan Hu)
- API: Allow to set or update a merge-request's milestone (Kirill Skachkov)
- Improve UI consistency between projects and groups lists
- Improve UI consistency between projects and groups lists
- Add sort dropdown to dashboard projects page
- Add sort dropdown to dashboard projects page
- Fixed logo animation on Safari (Roman Rott)
- Fixed logo animation on Safari (Roman Rott)
...
...
doc/api/merge_requests.md
View file @
81f2a9e5
...
@@ -225,6 +225,7 @@ Parameters:
...
@@ -225,6 +225,7 @@ Parameters:
-
`description`
(optional) - Description of MR
-
`description`
(optional) - Description of MR
-
`target_project_id`
(optional) - The target project (numeric id)
-
`target_project_id`
(optional) - The target project (numeric id)
-
`labels`
(optional) - Labels for MR as a comma-separated list
-
`labels`
(optional) - Labels for MR as a comma-separated list
-
`milestone_id`
(optional) - Milestone ID
```
json
```
json
{
{
...
@@ -277,6 +278,7 @@ Parameters:
...
@@ -277,6 +278,7 @@ Parameters:
-
`description`
- Description of MR
-
`description`
- Description of MR
-
`state_event`
- New state (close|reopen|merge)
-
`state_event`
- New state (close|reopen|merge)
-
`labels`
(optional) - Labels for MR as a comma-separated list
-
`labels`
(optional) - Labels for MR as a comma-separated list
-
`milestone_id`
(optional) - Milestone ID
```
json
```
json
{
{
...
...
lib/api/merge_requests.rb
View file @
81f2a9e5
...
@@ -71,6 +71,7 @@ module API
...
@@ -71,6 +71,7 @@ module API
# title (required) - Title of MR
# title (required) - Title of MR
# description - Description of MR
# description - Description of MR
# labels (optional) - Labels for MR as a comma-separated list
# labels (optional) - Labels for MR as a comma-separated list
# milestone_id (optional) - Milestone ID
#
#
# Example:
# Example:
# POST /projects/:id/merge_requests
# POST /projects/:id/merge_requests
...
@@ -78,7 +79,7 @@ module API
...
@@ -78,7 +79,7 @@ module API
post
":id/merge_requests"
do
post
":id/merge_requests"
do
authorize!
:create_merge_request
,
user_project
authorize!
:create_merge_request
,
user_project
required_attributes!
[
:source_branch
,
:target_branch
,
:title
]
required_attributes!
[
:source_branch
,
:target_branch
,
:title
]
attrs
=
attributes_for_keys
[
:source_branch
,
:target_branch
,
:assignee_id
,
:title
,
:target_project_id
,
:description
]
attrs
=
attributes_for_keys
[
:source_branch
,
:target_branch
,
:assignee_id
,
:title
,
:target_project_id
,
:description
,
:milestone_id
]
# Validate label names in advance
# Validate label names in advance
if
(
errors
=
validate_label_params
(
params
)).
any?
if
(
errors
=
validate_label_params
(
params
)).
any?
...
@@ -163,11 +164,12 @@ module API
...
@@ -163,11 +164,12 @@ module API
# state_event - Status of MR. (close|reopen|merge)
# state_event - Status of MR. (close|reopen|merge)
# description - Description of MR
# description - Description of MR
# labels (optional) - Labels for a MR as a comma-separated list
# labels (optional) - Labels for a MR as a comma-separated list
# milestone_id (optional) - Milestone ID
# Example:
# Example:
# PUT /projects/:id/merge_requests/:merge_request_id
# PUT /projects/:id/merge_requests/:merge_request_id
#
#
put
path
do
put
path
do
attrs
=
attributes_for_keys
[
:target_branch
,
:assignee_id
,
:title
,
:state_event
,
:description
]
attrs
=
attributes_for_keys
[
:target_branch
,
:assignee_id
,
:title
,
:state_event
,
:description
,
:milestone_id
]
merge_request
=
user_project
.
merge_requests
.
find
(
params
[
:merge_request_id
])
merge_request
=
user_project
.
merge_requests
.
find
(
params
[
:merge_request_id
])
authorize!
:update_merge_request
,
merge_request
authorize!
:update_merge_request
,
merge_request
...
...
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