Skip to content

Latest commit

 

History

History
223 lines (140 loc) · 10.8 KB

File metadata and controls

223 lines (140 loc) · 10.8 KB
name example route scope type
Update an organization
octokit.rest.orgs.update({ org })
PATCH /orgs/{org}
orgs
API method

Update an organization

Parameter Deprecation Notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.

Updates the organization's profile and member privileges.

With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:

  • advanced_security_enabled_for_new_repositories
  • dependabot_alerts_enabled_for_new_repositories
  • dependabot_security_updates_enabled_for_new_repositories
  • dependency_graph_enabled_for_new_repositories
  • secret_scanning_enabled_for_new_repositories
  • secret_scanning_push_protection_enabled_for_new_repositories

For more information on setting a default security configuration, see "Enabling security features at scale."

The authenticated user must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.

octokit.rest.orgs.update({
  org,
});

Parameters

name required description
orgyes

The organization name. The name is not case sensitive.

billing_emailno

Billing email address. This address is not publicized.

companyno

The company name.

emailno

The publicly visible email address.

twitter_usernameno

The Twitter username of the company.

locationno

The location.

nameno

The shorthand name of the company.

descriptionno

The description of the company. The maximum size is 160 characters.

has_organization_projectsno

Whether an organization can use organization projects.

has_repository_projectsno

Whether repositories that belong to the organization can use repository projects.

default_repository_permissionno

Default permission level members have for organization repositories.

members_can_create_repositoriesno

Whether of non-admin organization members can create repositories. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.

members_can_create_internal_repositoriesno

Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.

members_can_create_private_repositoriesno

Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.

members_can_create_public_repositoriesno

Whether organization members can create public repositories, which are visible to anyone. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.

members_allowed_repository_creation_typeno

Specifies which types of repositories non-admin organization members can create. private is only available to repositories that are part of an organization on GitHub Enterprise Cloud. Note: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.

members_can_create_pagesno

Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.

members_can_create_public_pagesno

Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.

members_can_create_private_pagesno

Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.

members_can_fork_private_repositoriesno

Whether organization members can fork private organization repositories.

web_commit_signoff_requiredno

Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface.

blogno
advanced_security_enabled_for_new_repositoriesno

Whether GitHub Advanced Security is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

dependabot_alerts_enabled_for_new_repositoriesno

Whether Dependabot alerts is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

dependabot_security_updates_enabled_for_new_repositoriesno

Whether Dependabot security updates is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

dependency_graph_enabled_for_new_repositoriesno

Whether dependency graph is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

secret_scanning_enabled_for_new_repositoriesno

Whether secret scanning is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

secret_scanning_push_protection_enabled_for_new_repositoriesno

Whether secret scanning push protection is automatically enabled for new repositories.

To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."

You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.

secret_scanning_push_protection_custom_link_enabledno

Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.

secret_scanning_push_protection_custom_linkno

If secret_scanning_push_protection_custom_link_enabled is true, the URL that will be displayed to contributors who are blocked from pushing a secret.

See also: GitHub Developer Guide documentation.