File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 22
33use Symfony \Component \OptionsResolver \Exception \InvalidOptionsException ;
44use Symfony \Component \OptionsResolver \Exception \UndefinedOptionsException ;
5+ use Symfony \Component \OptionsResolver \OptionsResolver ;
56
67class Projects extends AbstractApi
78{
@@ -496,11 +497,20 @@ public function removeLabel($project_id, $name)
496497
497498 /**
498499 * @param int $project_id
500+ * @param array $params (
501+ *
502+ * @var string $namespace The ID or path of the namespace that the project will be forked to
503+ * )
499504 * @return mixed
500505 */
501- public function fork ($ project_id )
506+ public function fork ($ project_id, array $ parameters = [] )
502507 {
503- return $ this ->post ('projects/ ' .$ this ->encodePath ($ project_id ).'/fork ' );
508+ $ resolver = new OptionsResolver ();
509+ $ resolver ->setDefined ('namespace ' );
510+
511+ $ resolved = $ resolver ->resolve ($ parameters );
512+
513+ return $ this ->post ($ this ->getProjectPath ($ project_id , 'fork ' ), $ resolved );
504514 }
505515
506516 /**
You can’t perform that action at this time.
0 commit comments