I got a not found exception by using
$client->api('organization')->teams()->addRepository(...)
I found this in the documentation:
https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions
put /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
current code:
if (isset($params['permission']) && !in_array($params['permission'], ['pull', 'push', 'admin'])) {
return $this->put('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params);
}
code suggestion:
if (isset($params['permission']) && !in_array($params['permission'], ['pull', 'push', 'maintain', 'triage', 'admin'])) {
return $this->put('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params);
}
I got a not found exception by using
$client->api('organization')->teams()->addRepository(...)I found this in the documentation:
https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions
put /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}current code:
code suggestion: