Movatterモバイル変換


[0]ホーム

URL:


Organization

Organization

Organization encapsulates the functionality to create repositories in organizations

Constructor

new Organization(organization, authopt, apiBaseopt)

Create a new Organization

Parameters:
NameTypeAttributesDefaultDescription
organizationstring

the name of the organization

authRequestable.auth <optional>

information required to authenticate to Github

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

the base Github API URL

Source:

Methods

createProject(options, cb) → {Promise}

Create a new project

Parameters:
NameTypeDescription
optionsObject

the description of the project

cbRequestable.callback

will receive the newly created project

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

createRepo(options, cbopt) → {Promise}

Create a repository in an organization

Parameters:
NameTypeAttributesDescription
optionsObject

the repository definition

cbRequestable.callback <optional>

will receive the created repository

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

createTeam(options, cbopt) → {Promise}

Create a team

Parameters:
NameTypeAttributesDescription
optionsobject

Team creation parameters

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 created team

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

getRepos(cbopt) → {Promise}

List the repositories in an organization

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the list of repositories

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

getTeams(cbopt) → {Promise}

List the Teams in the Organization

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the list of teams

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

isMember(username, cbopt) → {Promise}

Query if the user is a member or not

Parameters:
NameTypeAttributesDescription
usernamestring

the user in question

cbRequestable.callback <optional>

will receive true if the user is a member

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

listMembers(options, cbopt) → {Promise}

List the users who are members of the company

Parameters:
NameTypeAttributesDescription
optionsobject

filtering options

Properties
NameTypeAttributesDefaultDescription
filterstring <optional>
all

can be either2fa_disabled orall

rolestring <optional>
all

can be one of:all,admin, ormember

cbRequestable.callback <optional>

will receive the list of users

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

listProjects(cbopt) → {Promise}

Get information about all projects

Parameters:
NameTypeAttributesDescription
cbRequestable.callback <optional>

will receive the list of projects

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


[8]ページ先頭

©2009-2025 Movatter.jp