repo

Manage the targeted repository’s settings and team associations.

Added in version 1.1.0.

Part of the github resource type: states operate on the repository the state run was dispatched to, so there is no repo_name/owner parameter. The profile parameter defaults to the profile named in the resource declaration.

saltext.github.resources.github.states.repo.managed(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, default_branch=None, teams=None, profile=None)[source]

Ensure the targeted repository is configured as specified. Unspecified settings are left unmanaged.

Unlike the classic github_repo.present state, this never creates the repository — the resource’s existence is a given.

name

State name (the repository is implied by the resource).

description

Repository description.

homepage

URL with more information about the repository, e.g. rendered docs.

private

Repository visibility. Changing this requires allow_repo_privacy_changes to be enabled in the profile.

has_issues

Enable issues for this repository.

has_wiki

Enable the wiki for this repository.

has_downloads

Enable downloads for this repository.

default_branch

Default branch of the repository. The branch must already exist.

teams

Teams this repo should belong to, specified as a dict of team name to permission (pull, push or admin). Unlisted teams are removed from the repository. The teams belong to the repository’s owning organization, so this is only supported for organization-owned repositories.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.