GitHub API Orgs Teams class for the Joomla Platform.
All actions against teams require at a minimum an authenticated user who is a
member of the owner’s team in the :org being managed. Additionally, OAuth
users require “user” scope.
public
object
|
#
getList( string $org )
List teams.
Parameters
- $org
string - $org The name of the organization.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
get( integer $id )
Get team.
Parameters
- $id
integer - $id The team id.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
create( string $org, string $name, array $repoNames = array(), string $permission = '' )
Create team.
In order to create a team, the authenticated user must be an owner of the
organization.
Parameters
- $org
string - $org The name of the organization.
- $name
string - $name The name of the team.
- $repoNames
array - $repoNames Repository names.
- $permission
string - $permission The permission. pull - team members can pull, but not push to or
administer these repositories. Default push - team members can pull and push,
but not administer these repositories. admin - team members can pull, push and
administer these repositories.
Returns
object
Throws
Since
3.3 (CMS)
|
public
object
|
#
edit( integer $id, string $name, string $permission = '' )
Edit team.
In order to edit a team, the authenticated user must be an owner of the org
that the team is associated with.
Parameters
- $id
integer - $id The team id.
- $name
string - $name The name of the team.
- $permission
string - $permission The permission. pull - team members can pull, but not push to or
administer these repositories. Default push - team members can pull and push,
but not administer these repositories. admin - team members can pull, push and
administer these repositories.
Returns
object
Throws
Since
3.3 (CMS)
|
public
object
|
#
delete( integer $id )
Delete team.
In order to delete a team, the authenticated user must be an owner of the org
that the team is associated with.
Parameters
- $id
integer - $id The team id.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
getListMembers( integer $id )
List team members.
In order to list members in a team, the authenticated user must be a member
of the team.
Parameters
- $id
integer - $id The team id.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
isMember( integer $id, string $user )
Get team member.
In order to get if a user is a member of a team, the authenticated user must
be a member of the team.
Parameters
- $id
integer - $id The team id.
- $user
string - $user The name of the user.
Returns
object
Throws
Since
3.3 (CMS)
|
public
object
|
#
addMember( integer $id, string $user )
Add team member.
In order to add a user to a team, the authenticated user must have
‘admin’ permissions to the team or be an owner of the org that the team is
associated with.
Parameters
- $id
integer - $id The team id.
- $user
string - $user The name of the user.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
removeMember( integer $id, string $user )
Remove team member.
In order to remove a user from a team, the authenticated user must have
‘admin’ permissions to the team or be an owner of the org that the team is
associated with. NOTE: This does not delete the user, it just remove them from
the team.
Parameters
- $id
integer - $id The team id.
- $user
string - $user The name of the user.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
getListRepos( integer $id )
List team repos.
Parameters
- $id
integer - $id The team id.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
checkRepo( integer $id, string $repo )
Check if the repo is managed by this team.
Check if the repo is managed by this team.
Parameters
- $id
integer - $id The team id.
- $repo
string - $repo The name of the GitHub repository.
Returns
object
Throws
Since
3.3 (CMS)
|
public
object
|
#
addRepo( integer $id, string $owner, string $repo )
Add team repo.
In order to add a repo to a team, the authenticated user must be an owner of
the org that the team is associated with. Also, the repo must be owned by the
organization, or a direct form of a repo owned by the organization.
If you attempt to add a repo to a team that is not owned by the organization,
you get: Status: 422 Unprocessable Entity
Parameters
- $id
integer - $id The team id.
- $owner
string - $owner The name of the owner of the GitHub repository.
- $repo
string - $repo The name of the GitHub repository.
Returns
object
Since
3.3 (CMS)
|
public
object
|
#
removeRepo( integer $id, string $owner, string $repo )
Remove team repo.
In order to remove a repo from a team, the authenticated user must be an
owner of the org that the team is associated with. NOTE: This does not delete
the repo, it just removes it from the team.
Parameters
- $id
integer - $id The team id.
- $owner
string - $owner The name of the owner of the GitHub repository.
- $repo
string - $repo The name of the GitHub repository.
Returns
object
Since
3.3 (CMS)
|