|
| getList ($org) |
|
| get ($id) |
|
| create ($org, $name, array $repoNames=array(), $permission='') |
|
| edit ($id, $name, $permission='') |
|
| delete ($id) |
|
| getListMembers ($id) |
|
| isMember ($id, $user) |
|
| addMember ($id, $user) |
|
| removeMember ($id, $user) |
|
| getListRepos ($id) |
|
| checkRepo ($id, $repo) |
|
| addRepo ($id, $owner, $repo) |
|
| removeRepo ($id, $owner, $repo) |
|
| __get ($name) |
|
| __construct (Registry $options=null, JGithubHttp $client=null) |
|
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.
https://developer.github.com/v3/orgs/teams/
- Depuis
- 3.1.4
- Obsolète:
- 4.0 Use the
joomla/github
package via Composer instead
◆ addMember()
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.
- Paramètres
-
integer | $id | The team id. |
string | $user | The name of the user. |
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, $path, et $user.
◆ addRepo()
addRepo |
( |
|
$id, |
|
|
|
$owner, |
|
|
|
$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
- Paramètres
-
integer | $id | The team id. |
string | $owner | The name of the owner of the GitHub repository. |
string | $repo | The name of the GitHub repository. |
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ checkRepo()
Check if the repo is managed by this team.
- Paramètres
-
integer | $id | The team id. |
string | $repo | The name of the GitHub repository. |
- Exceptions
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ create()
create |
( |
|
$org, |
|
|
|
$name, |
|
|
array |
$repoNames = array() , |
|
|
|
$permission = '' |
|
) |
| |
Create team.
In order to create a team, the authenticated user must be an owner of the organization.
- Paramètres
-
string | $org | The name of the organization. |
string | $name | The name of the team. |
array | $repoNames | Repository names. |
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. |
- Exceptions
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $data, $name, et $path.
◆ delete()
Delete team.
In order to delete a team, the authenticated user must be an owner of the org that the team is associated with.
- Paramètres
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ edit()
edit |
( |
|
$id, |
|
|
|
$name, |
|
|
|
$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.
- Paramètres
-
integer | $id | The team id. |
string | $name | The name of the team. |
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. |
- Exceptions
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $data, $id, $name, et $path.
◆ get()
Get team.
- Paramètres
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ getList()
List teams.
- Paramètres
-
string | $org | The name of the organization. |
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $path.
◆ getListMembers()
List team members.
In order to list members in a team, the authenticated user must be a member of the team.
- Paramètres
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ getListRepos()
List team repos.
- Paramètres
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
◆ isMember()
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.
- Paramètres
-
integer | $id | The team id. |
string | $user | The name of the user. |
- Exceptions
-
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, $path, et $user.
◆ removeMember()
removeMember |
( |
|
$id, |
|
|
|
$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.
- Paramètres
-
integer | $id | The team id. |
string | $user | The name of the user. |
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, $path, et $user.
◆ removeRepo()
removeRepo |
( |
|
$id, |
|
|
|
$owner, |
|
|
|
$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.
- Paramètres
-
integer | $id | The team id. |
string | $owner | The name of the owner of the GitHub repository. |
string | $repo | The name of the GitHub repository. |
- Depuis
- 3.3 (CMS)
- Renvoie
- object
Références $id, et $path.
La documentation de cette classe a été générée à partir du fichier suivant :