Skip to content

Commit 8e3e3e3

Browse files
committed
Added methods to transfer a project to another group. Fixes #9
1 parent 7352540 commit 8e3e3e3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/Gitlab/Api/Groups.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ public function create($name, $path)
2424
'path' => $path
2525
));
2626
}
27+
28+
public function transfer($id, $project_id)
29+
{
30+
return $this->post('groups/'.urlencode($id).'/projects/'.urlencode($project_id));
31+
}
2732
}

lib/Gitlab/Model/Group.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,11 @@ public function show()
4949

5050
return Group::fromArray($this->getClient(), $data);
5151
}
52+
53+
public function transfer($project_id)
54+
{
55+
$data = $this->api('groups')->transfer($this->id, $project_id);
56+
57+
return Group::fromArray($this->getClient(), $data);
58+
}
5259
}

0 commit comments

Comments
 (0)