repo¶
Manage the targeted repository’s settings and inspect its identity and team associations.
Added in version 1.1.0.
Part of the github resource type: all functions operate on the
repository the job was dispatched to. The profile parameter
defaults to the profile named in the resource declaration.
- saltext.github.resources.github.modules.repo.ident()[source]¶
Return the identity of the targeted repository as a mapping with
id(the resource ID),ownerandrepo. Does not contact the API.CLI Example:
salt 'my-org/my-repo' repo.ident
- saltext.github.resources.github.modules.repo.info(*, ignore_cache=False, profile=None)[source]¶
Return information about the targeted repository.
CLI Example:
salt 'my-org/my-repo' repo.info
- ignore_cache
Bypass the use of cached repository information.
- profile
Profile configuration name to use. Defaults to the resource declaration’s profile.
- saltext.github.resources.github.modules.repo.get_teams(*, fields=None, profile=None)[source]¶
Return the teams the targeted repository belongs to, as a mapping of team name to details.
CLI Example:
salt 'my-org/my-repo' repo.get_teams
- fields
Only include these fields in the output. A single field name reduces each entry to the field’s value.
- profile
Profile configuration name to use. Defaults to the resource declaration’s profile.
- saltext.github.resources.github.modules.repo.update(*, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, default_branch=None, profile=None)[source]¶
Update the targeted repository’s settings. Returns the refreshed repository information.
CLI Example:
salt 'my-org/my-repo' repo.update description='Managed by Salt'
- description
Repository description.
- homepage
URL with more information about the repository, e.g. rendered docs.
- private
Repository visibility. Changing this requires
allow_repo_privacy_changesto 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. Must already exist.
- profile
Profile configuration name to use. Defaults to the resource declaration’s profile.