@@ -109,21 +109,27 @@ public function show($project_id, $mr_id)
109109 * @param string $source
110110 * @param string $target
111111 * @param string $title
112- * @param int $assignee
113- * @param int $target_project_id
114- * @param string $description
112+ * @param int $assignee @deprecated will be moved into $optionalParams
113+ * @param int $target_project_id @deprecated will be moved into $optionalParams
114+ * @param string $description @deprecated will be moved into $optionalParams
115+ * @param array $optionalParams
115116 * @return mixed
116117 */
117- public function create ($ project_id , $ source , $ target , $ title , $ assignee = null , $ target_project_id = null , $ description = null )
118+ public function create ($ project_id , $ source , $ target , $ title , $ assignee = null , $ target_project_id = null , $ description = null , array $ optionalParams = [] )
118119 {
119- return $ this -> post ( $ this -> getProjectPath ( $ project_id , ' merge_requests ' ), array (
120+ $ baseParams = [
120121 'source_branch ' => $ source ,
121122 'target_branch ' => $ target ,
122123 'title ' => $ title ,
123124 'assignee_id ' => $ assignee ,
125+ 'description ' => $ description ,
124126 'target_project_id ' => $ target_project_id ,
125- 'description ' => $ description
126- ));
127+ ];
128+
129+ return $ this ->post (
130+ $ this ->getProjectPath ($ project_id , 'merge_requests ' ),
131+ array_merge ($ baseParams , $ optionalParams )
132+ );
127133 }
128134
129135 /**
0 commit comments