Skip to content
On this page

Sections

Every top-level key a settings file can declare, one row per section: the endpoints it drives, the fine-grained PAT permission it needs, what happens to the live resources the file does not declare, and the notes that matter when declaring it.

SectionEndpointsPAT permissionUndeclared defaultNotes
repositoryPATCH repo, PUT topics, vulnerability-alerts, automated-security-fixes, private-vulnerability-reporting, lfs, immutable-releases, GraphQL RepositoryFeatures + UpdateRepositoryFeaturesAdministration: writeuntouchedProbot repository payload plus enable_* feature toggles; topics as string or list; enable_sponsorships and issue_creation_policy (all/collaborators_only) route through GraphQL - REST has no surface for them; declared fields only, undeclared siblings untouched
labelslabels CRUDIssues: writedeleted (settable)upsert by name (rename via new_name); the delete-by-default is Probot parity
rulesetsrepo rulesets CRUDAdministration: writekept (settable)branch, tag, and push targets; short ref names auto-prefixed (staging -> refs/heads/staging); deletion stays an explicit opt-in
environmentsenvironment listing + PUT environments + per-environment variables, secrets, deployment branch policies, deployment protection rules, and pins (GraphQL EnvironmentPins + EnvironmentPinsSnapshot + PinEnvironment + ReorderEnvironment)Environments: write; declared deployment_branch_policies and deployment_protection_rules keys additionally need Actions: read and Administration: writeuntouchedreviewers, wait timer, branch-policy flags; nested variables, secrets, deployment_branch_policies, and deployment_protection_rules keys reconcile per environment, each with its own _undeclared: knob (within a declared key, undeclared variables and branch-policy patterns are deleted; secrets and protection rules are kept); a pinned key pins the environment on the home page's deployments sidebar over GraphQL (declaration order sets the pin order, max 10 pins; environments without the key are never unpinned)
branchesprotected-branch listing + classic branch protection + required-signatures sub-endpoint + app-by-slug actor lookup + GraphQL BranchProtectionRules + BranchProtectionRulesSnapshot + BranchProtectionRepository + BranchProtectionActorUser + BranchProtectionActorTeam + CreateBranchProtectionRule + UpdateBranchProtectionRule + DeleteBranchProtectionRuleAdministration: writeuntouchedprotection: null removes protection; the protection PUT drops required_signatures, so declare it on any branch already carrying it; force_push_bypassers (users, org/team, app/slug) and required_deployments ride the GraphQL rule mutation; wildcard entries (release/*) reconcile entirely through GraphQL with a fixed key set; add Contents: read so check mode can tell a missing branch from an unprotected one
autolinksautolinks CRUDAdministration: writedeleted (settable)immutable upstream, so changed entries are replaced
actionsactions permissions + selected-actions + workflow token + access level + artifact/log retention + cache limits + OIDC subject claim + fork PR policiesAdministration: write; the oidc_customization_sub key alone instead needs Actions: writeuntouchedkeys with their own sub-endpoint route there; everything else rides the base permissions PUT verbatim
actions_secretsactions secrets list + public-key (read at apply) + sealed PUT + deleteSecrets: writekept (settable){name, value: $NAME} sealed writes, re-sent every apply; existence-only checks, values unrecoverable
dependabot_secretsdependabot secrets list + public-key (read at apply) + sealed PUT + deleteDependabot secrets: writekept (settable)as actions_secrets, over the Dependabot secret store
codespaces_secretscodespaces secrets list + public-key (read at apply) + sealed PUT + deleteCodespaces secrets: writekept (settable)as actions_secrets, over the Codespaces secret store
agents_secretsagents secrets list + public-key (read at apply) + sealed PUT + deleteAgent secrets: writekept (settable)as actions_secrets, over the Copilot agents secret store
workflowsActions workflows list, enable/disableActions: writeuntouched{path, state: active or disabled}; bare file names match .github/workflows/
check_suite_preferencescheck-suites preferences PATCH (no read endpoint exists upstream)Checks: writeuntouchedper-app auto_trigger_checks toggles; write-only: check mode cannot verify them (one note, zero requests) and apply re-asserts them every run; the token owner must be a repository administrator
pagesPOST/PUT/DELETE pagesPages: writeuntouchedbuild_type: workflow or legacy + source, cname, https_enforced, public (GHEC site visibility); pages: null disables the site
code_scanning_default_setupcode scanning default setupAdministration or Code scanning alerts: writeuntouchedstate, query_suite, languages; needs Advanced Security on private repositories
code_quality_setupcode-quality setupAdministration: writeuntouchedstate, languages, runner and AI-findings options; a 202 means GitHub rolls the change out in a configuration run; needs code quality available on the repository
collaboratorsdirect collaborators + pending invitationsAdministration: writedeleted (settable)invitations for new users, pending ones reconciled (stale permission updated, expired re-sent, undeclared cancelled); the repository owner is never touched
teamsorg team repo permissions + repo team listMembers: read (org permission) + Administration: writekept (settable)org repos only, skipped with a notice on personal accounts; undeclared teams kept by default (_undeclared: delete revokes their direct access)
milestonesmilestonesIssues: writekept (settable)upsert by title; deleting a milestone detaches it from every issue carrying it, which is why keep is the default
interaction_limitsinteraction-limits + pulls creation-cap/bypass-listAdministration: writeuntouchedre-arms the self-expiring limit every apply run; null clears it (base limit only); a 409 (org/user-level limit overrides) becomes a note; the PR creation cap is persistent (PATCHed only on divergence, 405 where unavailable) and its bypass logins reconcile add/remove
actions_variablesActions variables CRUDVariables: writedeleted (settable)plain-text variables upserted by name (case-insensitive); values read back in full, so check mode diffs them exactly
agents_variablesCopilot agents variables CRUDAgent variables: writedeleted (settable)as actions_variables, over the Copilot agents variable store
webhookshooks CRUD + hook config sub-endpointWebhooks: writekept (settable)one hook per config.url, the natural key; config.secret takes a $NAME reference and is re-sent every run
custom_propertiesGET/PATCH properties/values; probes GET /orgs/Custom properties: writekept (settable)values of org-defined properties (definitions are org-scoped); org repos only, skipped with a notice on personal accounts; value: null unsets
deploy_keysdeploy keys list/create/deleteAdministration: writekept (settable)matched by title; the declared material is a PUBLIC key; immutable upstream, so changed entries are replaced
secret_scanning_custom_patternssecret-scanning custom patterns: paginated list + bulk POST + PATCH by id + bulk DELETESecret scanning alerts: writekept (settable)matched by name (immutable upstream); state and push_protection_enabled are not declarable; deletes always resolve alerts

The Undeclared default column

What happens to a live resource the settings file does not declare:

ValueMeaning
deleted (settable)An undeclared resource is deleted on apply, so the declared list is the complete inventory.
kept (settable)An undeclared resource is left in place; only declared entries are compared and written.
untouchedUndeclared top-level entries are neither compared nor changed; only declared keys are applied. A nested list inside a declared entry (an environment's variables, say) has its own default, named in the Notes cell.

(settable) means the wrapped _undeclared: form overrides the default per file. The undeclared policy covers the knob and how it layers in mode: render.

  • Semantics: the model every section shares (stateless, declared-keys-only, convergent applies, loud failures).
  • Forward compatibility: which sections pass payloads through verbatim and which are closed.
  • Coverage: every row above expanded into its areas, one link per call, with the facts and caveats as notes, plus the gaps.
Built from main at 1a25adbSource: docs/reference/sections.md