File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -148,4 +148,14 @@ public function search($query)
148148 return $ this ->get ('projects/search/ ' .urlencode ($ query ));
149149 }
150150
151+ public function createForkRelation ($ project_id , $ forked_project_id )
152+ {
153+ return $ this ->post ('projects/ ' .urlencode ($ project_id ).'/fork/ ' .urlencode ($ forked_project_id ));
154+ }
155+
156+ public function removeForkRelation ($ project_id )
157+ {
158+ return $ this ->delete ('projects/ ' .urlencode ($ project_id ).'/fork ' );
159+ }
160+
151161}
Original file line number Diff line number Diff line change @@ -496,4 +496,24 @@ public function transfer($group_id)
496496
497497 return $ group ->transfer ($ this ->id );
498498 }
499+
500+ public function forkTo ($ id )
501+ {
502+ return $ this ->api ('projects ' )->createForkRelation ($ id , $ this ->id );
503+ }
504+
505+ public function forkFrom ($ id )
506+ {
507+ return $ this ->createForkRelation ($ id );
508+ }
509+
510+ public function createForkRelation ($ id )
511+ {
512+ return $ this ->api ('projects ' )->createForkRelation ($ this ->id , $ id );
513+ }
514+
515+ public function removeForkRelation ()
516+ {
517+ return $ this ->api ('projects ' )->removeForkRelation ($ this ->id );
518+ }
499519}
You can’t perform that action at this time.
0 commit comments