Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-16 11:43:25 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-16 11:43:25 +0400
commitfddbd7b2f076876ec5dd37031aae80748c376cc6 (patch)
tree435e391a09442cdb56dc57b366a144a55bc735f8 /lib/api
parentf3220ababbbc5ae4f01be1900de616e20c7c4359 (diff)
parentf84d84622393223e40dd9533f86266d5f377f881 (diff)
Merge branch 'issue-110' of https://gitlab.com/gmessner/gitlab-ce into gmessner/gitlab-ce-issue-110
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/merge_requests.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 58d2f79faff..e2458198411 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -64,6 +64,7 @@ module API
# target_project - The target project of the merge request defaults to the :id of the project
# assignee_id - Assignee user ID
# title (required) - Title of MR
+ # description - Description of MR
#
# Example:
# POST /projects/:id/merge_requests
@@ -72,7 +73,7 @@ module API
set_current_user_for_thread do
authorize! :write_merge_request, user_project
required_attributes! [:source_branch, :target_branch, :title]
- attrs = attributes_for_keys [:source_branch, :target_branch, :assignee_id, :title, :target_project_id]
+ attrs = attributes_for_keys [:source_branch, :target_branch, :assignee_id, :title, :target_project_id, :description]
merge_request = user_project.merge_requests.new(attrs)
merge_request.author = current_user
merge_request.source_project = user_project
@@ -105,12 +106,13 @@ module API
# assignee_id - Assignee user ID
# title - Title of MR
# state_event - Status of MR. (close|reopen|merge)
+ # description - Description of MR
# Example:
# PUT /projects/:id/merge_request/:merge_request_id
#
put ":id/merge_request/:merge_request_id" do
set_current_user_for_thread do
- attrs = attributes_for_keys [:source_branch, :target_branch, :assignee_id, :title, :state_event]
+ attrs = attributes_for_keys [:source_branch, :target_branch, :assignee_id, :title, :state_event, :description]
merge_request = user_project.merge_requests.find(params[:merge_request_id])
authorize! :modify_merge_request, merge_request