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_params are compared, server-populated fields are ignored.

conn

GitHubConnection to use.

name

Ruleset name to manage.

repo_name

Name of the repository.

ruleset_params

Ruleset definition. Must contain at least enforcement when the ruleset needs to be created. name is pulled from this state’s name.

owner

Owner of the repository. Defaults to the connection’s owner.

test

Only project the changes without applying them (test mode).

saltext.github.utils.gh.statecores.rulesets.absent(conn, name, repo_name, *, owner=None, test=False)[source]

Ensure a repository ruleset is absent.

conn

GitHubConnection to 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 (test mode).