saltext.github.utils.gh.statecores.rulesets¶
State core managing repository rulesets.
- saltext.github.utils.gh.statecores.rulesets.present(conn, name, repo_name, *, ruleset_params=None, owner=None, test=False)[source]¶
Ensure a repository ruleset is present and configured as specified. Only the parameters included in
ruleset_paramsare compared, server-populated fields are ignored.- conn
GitHubConnectionto use.- name
Ruleset name to manage.
- repo_name
Name of the repository.
- ruleset_params
Ruleset definition. Must contain at least
enforcementwhen the ruleset needs to be created.nameis pulled from this state’sname.- owner
Owner of the repository. Defaults to the connection’s owner.
- test
Only project the changes without applying them (
testmode).
- saltext.github.utils.gh.statecores.rulesets.absent(conn, name, repo_name, *, owner=None, test=False)[source]¶
Ensure a repository ruleset is absent.
- conn
GitHubConnectionto use.- name
Ruleset name to manage.
- repo_name
Name of the repository.
- owner
Owner of the repository. Defaults to the connection’s owner.
- test
Only project the changes without applying them (
testmode).