github

Deprecated: Manage organization teams/members, repositories and rulesets.

Deprecated since version 1.1.0: Use the github_org and github_repo state modules instead.

saltext.github.states.github.__virtual__()[source]

Only load if the github module is available in __salt__

saltext.github.states.github.present(name, profile='github', **kwargs)[source]

Ensure a user is present

Deprecated since version 1.1.0: Use github_org.member_present instead.

ensure user test is present in github:
    github.present:
        - name: gitexample
name

This is the github handle of the user in the organization

saltext.github.states.github.absent(name, profile='github', **kwargs)[source]

Ensure a github user is absent

Deprecated since version 1.1.0: Use github_org.member_absent instead.

ensure user test is absent in github:
    github.absent:
        - name: Example TestUser1
        - email: example@domain.com
        - username: gitexample
name

Github handle of the user in organization

saltext.github.states.github.team_present(name, description=None, repo_names=None, privacy='secret', permission='pull', members=None, enforce_mfa=False, no_mfa_grace_seconds=0, profile='github', **kwargs)[source]

Ensure a team is present

Deprecated since version 1.1.0: Use github_org.team_present instead.

name

This is the name of the team in the organization.

description

The description of the team.

repo_names

The names of repositories to add the team to.

privacy

The level of privacy for the team, can be secret or closed. Defaults to secret.

permission

The default permission for new repositories added to the team, can be pull, push or admin. Defaults to pull.

members

The members belonging to the team, specified as a dict of member name to optional configuration. Options include enforce_mfa_from and mfa_exempt.

enforce_mfa

Whether to enforce MFA requirements on members of the team. If True then all members without mfa_exempt: True configured will be removed from the team. Note that no_mfa_grace_seconds may be set to allow members a grace period.

no_mfa_grace_seconds

The number of seconds of grace time that a member will have to enable MFA before being removed from the team. The grace period will begin from enforce_mfa_from on the member configuration, which defaults to 1970/01/01.

Example:

Ensure team test is present in github:
    github.team_present:
        - name: test
        - members:
            user1: {}
            user2: {}

Ensure team test_mfa is present in github:
    github.team_present:
        - name: test_mfa
        - members:
            user1:
                enforce_mfa_from: 2016/06/15
        - enforce_mfa: True
saltext.github.states.github.team_absent(name, profile='github', **kwargs)[source]

Ensure a team is absent.

Deprecated since version 1.1.0: Use github_org.team_absent instead.

Example:

ensure team test is present in github:
    github.team_absent:
        - name: test
name

This is the name of the team in the organization.

saltext.github.states.github.repo_present(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=False, gitignore_template=None, license_template=None, teams=None, profile='github', **kwargs)[source]

Ensure a repository is present

Deprecated since version 1.1.0: Use github_repo.present instead.

name

This is the name of the repository.

description

The description of the repository.

homepage

The URL with more information about the repository.

private

The visiblity of the repository. Note that private repositories require a paid GitHub account.

has_issues

Whether to enable issues for this repository.

has_wiki

Whether to enable the wiki for this repository.

has_downloads

Whether to enable downloads for this repository.

auto_init

Whether to create an initial commit with an empty README.

gitignore_template

The desired language or platform for a .gitignore, e.g “Haskell”.

license_template

The desired LICENSE template to apply, e.g “mit” or “mozilla”.

teams

The teams for which this repo should belong to, specified as a dict of team name to permission (pull, push or admin).

Example:

Ensure repo my-repo is present in github:
    github.repo_present:
        - name: my-repo
        - description: My very important repository
saltext.github.states.github.repo_absent(name, profile='github', **kwargs)[source]

Ensure a repo is absent.

Deprecated since version 1.1.0: Use github_repo.absent instead.

Example:

ensure repo test is absent in github:
    github.repo_absent:
        - name: test
name

This is the name of the repository in the organization.

saltext.github.states.github.ruleset_absent(name, ruleset_type, profile='github', owner=None, repo_name=None, org_name=None, **kwargs)[source]

Ensure a ruleset is absent.

Deprecated since version 1.1.0: Use github_org.ruleset_absent or github_repo.ruleset_absent instead.

Example:

ensure rulset test is absent in github:
    github.ruleset_absent:
        - name: test
        - ruleset_type: repo
        - owner: test
        - repo_name: test_repo
name

name of the ruleset.

ruleset_type

type of ruleset (org or repo)

saltext.github.states.github.ruleset_present(name, ruleset_type, profile='github', owner=None, repo_name=None, org_name=None, ruleset_params=None, **kwargs)[source]

Ensure a ruleset is present.

Deprecated since version 1.1.0: Use github_org.ruleset_present or github_repo.ruleset_present instead.

Example:

ensure rulset test is present in github:
    github.ruleset_present:
        - name: test
        - ruleset_type: repo
        - owner: test
        - repo_name: test_repo
        - ruleset_params:
            target: branch
            enforcement: disabled
name

name of the ruleset.

ruleset_type

type of ruleset (org or repo)

ruleset_params

parameters to set the ruleset rules. i.e {enforcement: disabled}