Skip to content

Commit a66cd9c

Browse files
committed
Added teams() method to Project model
1 parent d50da9c commit a66cd9c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Gitlab/Model/Project.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ public function removeMember($user_id)
104104
return true;
105105
}
106106

107+
public function teams()
108+
{
109+
$data = $this->api('teams')->all($this->id);
110+
111+
$teams = array();
112+
foreach ($data as $team) {
113+
$teams[] = Team::fromArray($this->getClient(), $team);
114+
}
115+
116+
return $teams;
117+
}
118+
107119
public function addToTeam($team_id, $greatest_access_level)
108120
{
109121
$team = new Team($team_id, $this->getClient());

0 commit comments

Comments
 (0)