ruleset¶
Manage the targeted repository’s rulesets.
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.ruleset.present(name, ruleset_params=None, profile=None)[source]¶
Ensure a ruleset is present in the targeted repository and configured as specified. Only the parameters included in
ruleset_paramsare compared, server-populated fields are ignored.Example:
Ensure ruleset test is present: ruleset.present: - name: test - ruleset_params: target: branch enforcement: active
- name
Ruleset name to manage.
- ruleset_params
Ruleset definition. Must contain at least
enforcementwhen the ruleset needs to be created.nameis pulled from this state’sname.- profile
Profile configuration name to use. Defaults to the resource declaration’s profile.