Skip to content

General Settings

General settings cover the repository’s basic properties, feature toggles, and pull request merge behavior.

spec:
description: "My awesome project"
homepage: "https://example.com"
visibility: public # public | private | internal
archived: false
topics:
- go
- cli
- github
Field Type Description
description string Repository description
homepage string URL displayed on the repo page
visibility string public, private, or internal (GitHub Enterprise)
archived bool true to archive (read-only). Reversible — set to false to unarchive
topics list GitHub topics for discoverability. Omit it to leave the current topics unchanged; [] removes all topics

Set archived: true to mark a repository as read-only:

spec:
archived: true

This is reversible — set it back to false to unarchive.

An archived repository refuses every other change, so apply unarchives before the repository’s other changes and archives after all of them, including FileSets for the repository in the same run. If any of those fail, the repository is not archived and the archive is reported as failed, so the next apply can still fix them.

To change a repository that is already archived, set archived: false in the same manifest; it is unarchived first. gh-infra does not change an archived repository otherwise: plan reports the repository as an error, leaves it out of the plan, and exits with 1; the other repositories are still planned and applied. GitHub makes an archived repository read-only, and while a few of its APIs (such as secrets and topics) still accept writes, gh-infra does not rely on them.

Toggle repository features on or off:

spec:
features:
issues: true
projects: false
wiki: false
discussions: false
pull_requests: true
Field Type Default Description
issues bool true Enable Issues tab
projects bool true Enable Projects tab
wiki bool true Enable Wiki tab
discussions bool false Enable Discussions tab
pull_requests bool or object true Enable Pull Requests and optionally restrict creation

The pull_requests field accepts either a simple boolean or an object:

# Simple form — enable or disable pull requests
spec:
features:
pull_requests: true # or false to disable
# Object form — restrict who can create PRs
spec:
features:
pull_requests:
creation: collaborators_only # all | collaborators_only

Using the object form implicitly enables pull requests — there is no enabled field to set.

Field Type Default Description
creation string all all — anyone can create PRs; collaborators_only — only collaborators can create PRs

Control how pull requests can be merged:

spec:
merge_strategy:
allow_merge_commit: false
allow_squash_merge: true
allow_rebase_merge: false
allow_auto_merge: true
auto_delete_head_branches: true
merge_commit_title: MERGE_MESSAGE # MERGE_MESSAGE | PR_TITLE
merge_commit_message: PR_TITLE # PR_TITLE | PR_BODY | BLANK
squash_merge_commit_title: PR_TITLE # PR_TITLE | COMMIT_OR_PR_TITLE
squash_merge_commit_message: COMMIT_MESSAGES # COMMIT_MESSAGES | PR_BODY | BLANK
Field Type Description
allow_merge_commit bool Allow merge commits
allow_squash_merge bool Allow squash merging
allow_rebase_merge bool Allow rebase merging
allow_auto_merge bool Allow auto-merge on pull requests
auto_delete_head_branches bool Automatically delete head branches after merge
merge_commit_title string Title format for merge commits
merge_commit_message string Message format for merge commits
squash_merge_commit_title string Title format for squash merges
squash_merge_commit_message string Message format for squash merges

Prevent releases and their assets from being modified or deleted after publishing:

spec:
release_immutability: true
Field Type Description
release_immutability bool true to lock releases after publishing. Once enabled, release assets and metadata cannot be edited or deleted