JGithubPackageOrgsTeams
class JGithubPackageOrgsTeams extends JGithubPackage
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.
Methods
List teams.
Get team.
Create team.
Edit team.
Delete team.
List team members.
Get team member.
Add team member.
Remove team member.
List team repos.
Check if the repo is managed by this team.
Add team repo.
Remove team repo.
Details
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.
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.
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.
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.
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.
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.
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.
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