Skip to content

Commit 34a022d

Browse files
authored
Merge pull request #483 from acrobat/param-name-fix
Use correct parameter name for organisation/teams api
2 parents 5a55b02 + ee64ec5 commit 34a022d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Github/Api/Organization/Teams.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,22 @@ public function repositories($team)
7878
return $this->get('/teams/'.rawurlencode($team).'/repos');
7979
}
8080

81-
public function repository($team, $username, $repository)
81+
public function repository($team, $organization, $repository)
8282
{
83-
return $this->get('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($username).'/'.rawurlencode($repository));
83+
return $this->get('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository));
8484
}
8585

86-
public function addRepository($team, $username, $repository, $params = array())
86+
public function addRepository($team, $organization, $repository, $params = array())
8787
{
8888
if (isset($params['permission']) && !in_array($params['permission'], array('pull', 'push', 'admin'))) {
8989
$params['permission'] = 'pull';
9090
}
9191

92-
return $this->put('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($username).'/'.rawurlencode($repository), $params);
92+
return $this->put('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params);
9393
}
9494

95-
public function removeRepository($team, $username, $repository)
95+
public function removeRepository($team, $organization, $repository)
9696
{
97-
return $this->delete('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($username).'/'.rawurlencode($repository));
97+
return $this->delete('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository));
9898
}
9999
}

0 commit comments

Comments
 (0)