repository section configures GitHub repository settings. These settings control repository behavior, features, security, and merge strategies.
Basic Configuration
Repository name. If not specified, uses the
repo field.A short description of the repository that will show up on GitHub.
A URL with more information about the repository.
A list of topics to set on the repository.
Visibility and Privacy
Either
true to make the repository private, or false to make it public. If this value is changed and org members cannot change the visibility of repos, it will result in an error.Can be
public, private, or internal. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal.Whether to archive this repository.
false will unarchive a previously archived repository.Repository Features
Either
true to enable issues for this repository, or false to disable them.Either
true to enable projects for this repository, or false to disable them. If projects are disabled for the organization, passing true will cause an API error.Either
true to enable the wiki for this repository, or false to disable it.Branch Configuration
The default branch for this repository. Safe Settings will rename the branch if it already exists, or create it if it doesn’t exist.
Merge Options
Either
true to allow squash-merging pull requests, or false to prevent squash-merging.Either
true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.Either
true to allow rebase-merging pull requests, or false to prevent rebase-merging.Either
true to allow auto-merge on pull requests, or false to disallow auto-merge.Either
true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.Either
true to allow update branch on pull requests, or false to disallow update branch.Security Settings
Repository Creation
If set to
true, Safe Settings will create the repository if it doesn’t exist. This setting is not sent to the GitHub API.Create an initial commit with empty README. Keep this set to
true in most cases since many policies cannot be implemented on bare repos.When creating a repository with
force_create, use this template repository name. The template must be owned by the same organization.Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, “Haskell”.
Choose an open source license template that best suits your needs, and then use the license keyword as the
license_template string. For example, “mit” or “mpl-2.0”.