Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -32,12 +32,18 @@ class Teams extends AbstractApi
return $this->post('/orgs/'.rawurlencode($organization).'/teams', $params);
}
public function show($team)
/**
* @link https://developer.github.com/v3/teams/#list-teams
*/
public function show($team, $organization)
{
return $this->get('/teams/'.rawurlencode($team));
return $this->get('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team));
}
public function update($team, array $params)
/**
* @link https://developer.github.com/v3/teams/#edit-team
*/
public function update($team, array $params, $organization)
{
if (!isset($params['name'])) {
throw new MissingArgumentException('name');
@@ -46,32 +52,47 @@ class Teams extends AbstractApi
$params['permission'] = 'pull';
}
return $this->patch('/teams/'.rawurlencode($team), $params);
return $this->patch('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team), $params);
}
public function remove($team)
/**
* @link https://developer.github.com/v3/teams/#delete-team
*/
public function remove($team, $organization)
{
return $this->delete('/teams/'.rawurlencode($team));
return $this->delete('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team));
}
public function members($team)
/**
* @link https://developer.github.com/v3/teams/members/#list-team-members
*/
public function members($team, $organization)
{
return $this->get('/teams/'.rawurlencode($team).'/members');
return $this->get('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/members');
}
public function check($team, $username)
/**
* @link https://developer.github.com/v3/teams/members/#get-team-membership
*/
public function check($team, $username, $organization)
{
return $this->get('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
return $this->get('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
}
public function addMember($team, $username)
/**
* @link https://developer.github.com/v3/teams/members/#add-or-update-team-membership
*/
public function addMember($team, $username, $organization)
{
return $this->put('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
return $this->put('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
}
public function removeMember($team, $username)
/**
* @link https://developer.github.com/v3/teams/members/#remove-team-membership
*/
public function removeMember($team, $username, $organization)
{
return $this->delete('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
return $this->delete('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username));
}
public function repositories($team)
@@ -86,15 +107,15 @@ class Teams extends AbstractApi
public function addRepository($team, $organization, $repository, $params = [])
{
if (isset($params['permission']) && !in_array($params['permission'], ['pull', 'push', 'admin'])) {
if (isset($params['permission']) && !in_array($params['permission'], ['pull', 'push', 'admin', 'maintain', 'triage'])) {
$params['permission'] = 'pull';
}
return $this->put('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params);
return $this->put('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params);
}
public function removeRepository($team, $organization, $repository)
{
return $this->delete('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository));
return $this->delete('/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository));
}
}