Organization Settings
The following table captures all supported settings on organization level:
Key | Value | Description | Notes |
---|---|---|---|
name | string or null | The display name of the organization | |
description | string or null | The description of the organization | |
plan | string | The billing plan of the organization | read-only property |
string or null | The main contact point of the organization | ||
billing_email | string | The billing email | |
blog | string or null | The blog url (usually links to the homepage of the organization) | |
twitter_username | string or null | The twitter username of the organization | |
location | string or null | The geographic location of the organization | |
company | string or null | The company name if | |
default_branch_name | string | The default branch name for newly created repositories | |
default_repository_permission | string | The base permission for all members of the organization for its repositories | none , read , write or admin |
default_workflow_permissions | string | The default permissions granted to the GITHUB_TOKEN when running workflows in this organization | read or write |
dependabot_alerts_enabled_for_new_repositories | boolean | If dependabot alerts will be enabled by default for newly created repos | |
dependabot_security_updates_enabled_for_new_repositories | boolean | If dependabot security updates will be enabled by default for newly created repos | |
dependency_graph_enabled_for_new_repositories | boolean | If the dependency graph is will be enabled by default for newly created repos | |
discussion_source_repository | string or null | The source repository to host organization discussions | |
has_discussions | boolean | If discussions are enabled for the organization. If true , property discussion_source_repository must be set as well |
|
has_organization_projects | boolean | If the organization can have organization projects | |
has_repository_projects | boolean | If the repositories can have repository projects | |
members_can_change_project_visibility | boolean | If members with admin permissions for a project can change its visibility | |
members_can_change_repo_visibility | boolean | If members with admin permissions for a repo can change its visibility | |
members_can_create_private_repositories | boolean | If members can create private repos | |
members_can_create_public_pages | boolean | If members can create public GitHub Pages sites in this organization. If disabled, no GitHub Pages will not be published for the organization. | |
members_can_create_public_repositories | boolean | If members can create public repos | |
members_can_create_teams | boolean | If members can create new teams | |
members_can_delete_issues | boolean | If members with admin permissions for a repo can delete issues, otherwise only organization owners can delete issues | |
members_can_delete_repositories | boolean | If members with admin permissions for a repo can delete or transfer it | |
members_can_fork_private_repositories | boolean | If members can fork private repos | |
packages_containers_internal | boolean | If members can publish internal releases / containers visible to all organization members | |
packages_containers_public | boolean | If members can publish public releases / containers visible to anyone | |
readers_can_create_discussions | boolean or null | If users with read access can create and comment on discussions | |
security_managers | list[string] | List of teams that should act as security managers | |
two_factor_requirement | boolean | If two factor is required for all members | read-only property, can only be changed via the Web UI |
web_commit_signoff_required | boolean | If repositories require contributors to sign-off on commits they make through GitHub's web interface. If enabled on organization level, it overrides the setting on repo level | |
workflows | Workflow Settings | Workflow settings on organizational level |
Validation rules¶
- enabling either
dependabot_alerts_enabled_for_new_repositories
ordependabot_security_updates_enabled_for_new_repositories
also requires enablingdependency_graph_enabled_for_new_repositories
- enabling
dependabot_security_updates_enabled_for_new_repositories
also requires enablingdependabot_alerts_enabled_for_new_repositories
- enabling
has_discussions
also requires settingdiscussion_source_repository
to a valid repository to host the discussions
Example usage¶
orgs.newOrg('adoptium') {
settings+: {
blog: "https://adoptium.net",
default_repository_permission: "none",
description: "The Adoptium Working Group ...",
name: "Eclipse Adoptium",
readers_can_create_discussions: true,
security_managers+: [
"adoptium-project-leads"
],
twitter_username: "adoptium",
web_commit_signoff_required: false,
},
...
}