Movatterモバイル変換


[0]ホーム

URL:


Team

Team

A Team allows scoping of API requests to a particular Github Organization Team.

Constructor

new Team(teamIdopt, authopt, apiBaseopt)

Create a Team.

Parameters:
NameTypeAttributesDefaultDescription
teamIdstring <optional>

the id for the team

authRequestable.auth <optional>

information required to authenticate to Github

apiBasestring <optional>
https://api.github.com

the base Github API URL

Source:

Methods

addMembership(username, options, cbopt) → {Promise}

Add a member to the Team

Parameters:
NameTypeAttributesDescription
usernamestring

can be one of:all,maintainer, ormember

optionsobject

Parameters for adding a team member

Properties
NameTypeAttributesDefaultDescription
rolestring <optional>
member

The role that this user should have in the team. Can be oneof:member, ormaintainer

cbRequestable.callback <optional>

will receive the membership status of added user

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

deleteTeam(cbopt) → {Promise}

Delete Team

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the list of repositories

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

editTeam(options, cbopt) → {Promise}

Edit Team information

Parameters:
NameTypeAttributesDescription
optionsobject

Parameters for team edit

Properties
NameTypeAttributesDefaultDescription
namestring

The name of the team

descriptionstring <optional>

Team description

repo_namesstring <optional>

Repos to add the team to

privacystring <optional>
secret

The level of privacy the team should have. Can be either oneof:secret, orclosed

cbRequestable.callback <optional>

will receive the updated team

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

getMembership(username, cbopt) → {Promise}

Get Team membership status for a user

Parameters:
NameTypeAttributesDescription
usernamestring

can be one of:all,maintainer, ormember

cbRequestable.callback <optional>

will receive the membership status of a user

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

getTeam(cbopt) → {Promise}

Get Team information

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the team

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

isManagedRepo(owner, repo, cbopt) → {Promise}

Get repo management status for team

Parameters:
NameTypeAttributesDescription
ownerstring

Organization name

repostring

Repo name

cbRequestable.callback <optional>

will receive the membership status of added user

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

listMembers(options, cbopt) → {Promise}

List the users who are members of the Team

Parameters:
NameTypeAttributesDescription
optionsobject

Parameters for listing team users

Properties
NameTypeAttributesDefaultDescription
rolestring <optional>
all

can be one of:all,maintainer, ormember

cbRequestable.callback <optional>

will receive the list of users

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

listRepos(cbopt) → {Promise}

List the Team's repositories

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the list of repositories

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

manageRepo(owner, repo, options, cbopt) → {Promise}

Add or Update repo management status for team

Parameters:
NameTypeAttributesDescription
ownerstring

Organization name

repostring

Repo name

optionsobject

Parameters for adding or updating repo management for the team

Properties
NameTypeAttributesDescription
permissionstring <optional>

The permission to grant the team on this repository. Can be oneof:pull,push, oradmin

cbRequestable.callback <optional>

will receive the membership status of added user

Source:
See:
Returns:
  • the promise for the http request
Type
Promise

unmanageRepo(owner, repo, cbopt) → {Promise}

Remove repo management status for team

Parameters:
NameTypeAttributesDescription
ownerstring

Organization name

repostring

Repo name

cbRequestable.callback <optional>

will receive the membership status of added user

Source:
See:
Returns:
  • the promise for the http request
Type
Promise


[8]ページ先頭

©2009-2025 Movatter.jp