salt.modules.github
Skip to main content Table of Contents Salt Project Introduction to Salt Salt system architecture Contributing to Salt: A Guide for Contributors Salt Project maintenance policies Installation Configuring Salt Using Salt Remote Execution Configuration Management Return Codes Utility Modules - Code Reuse in Custom Modules Events & Reactor Orchestration Solaris Salt SSH Thorium Complex Reactor Salt Cloud Salt Proxy Minion Network Automation Salt Virt Onedir Packaging Command Line Reference Pillars Master Tops Salt Module Reference auth modules beacon modules cache modules cloud modules Configuring Salt engine modules execution modules executors modules fileserver modules grains modules netapi modules output modules pillar modules proxy modules queue modules renderer modules returner modules roster modules runner modules sdb modules serializer modules state modules thorium modules token modules master tops modules wheel modules APIs Architecture Minion Data Cache Slots Windows Developing Salt Release notes Venafi Tools for Salt Glossary salt.modules.github # Module for interacting with the GitHub v3 API.
New in version 2016.3.0. depends : PyGithub python module Configuration # Configure this module by specifying the name of a configuration profile in the minion config, minion pillar, or master config. The module will use the 'github' key by default, if defined. For example: github : token : abc1234 org_name : my_organization # optional: some functions require a repo_name, which # can be set in the config file, or passed in at the CLI. repo_name : my_repo # optional: it can be dangerous to change the privacy of a repository # in an automated way. set this to True to allow privacy modifications allow_repo_privacy_changes : False salt.modules.github. add_repo ( name , description = None , homepage = None , private = None , has_issues = None , has_wiki = None , has_downloads = None , auto_init = None , gitignore_template = None , license_template = None , profile = 'github' ) # Create a new github repository. name The name of the team to be created. 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". profile The name of the profile configuration to use.
Defaults to github . CLI Example: salt myminion github.add_repo 'repo_name' New in version 2016.11.0. salt.modules.github. add_team ( name , description = None , repo_names = None , privacy = None , permission = None , profile = 'github' ) # Create a new Github team within an organization. name The name of the team to be created. 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'. permission The default permission for new repositories added to the team, can be 'pull', 'push' or 'admin'. profile The name of the profile configuration to use.
Defaults to github . CLI Example: salt myminion github.add_team 'team_name' New in version 2016.11.0. salt.modules.github. add_team_member ( name , team_name , profile = 'github' ) # Adds a team member to a team with team_name. name The name of the team member to add. team_name The name of the team of which to add the user. profile The name of the profile configuration to use. Defaults to github . CLI Example: salt myminion github.add_team_member 'user_name' 'team_name' New in version 2016.11.0. salt.modules.github. add_team_repo ( repo_name , team_name , profile = 'github' , permission = None ) # Adds a repository to a team with team_name. repo_name The name of the repository to add. team_name The name of the team of which to add the repository. profile The name of the profile configuration to use.
Defaults to github . permission The permission for team members within the repository, can be 'pull', 'push' or 'admin'. If not specified, the default permission specified on the team will be used. New in version 2017.7.0. CLI Example: salt myminion github.add_team_repo 'my_repo' 'team_name' New in version 2016.11.0. salt.modules.github. add_user ( name , profile = 'github' ) # Add a GitHub user. name The user for which to obtain information. profile The name of the profile configuration to use.
Defaults to github . CLI Example: salt myminion github.add_user github-handle salt.modules.github. edit_repo ( name , description = None , homepage = None , private = None , has_issues = None , has_wiki = None , has_downloads = None , profile = 'github' ) # Updates an existing Github repository. name The name of the team to be created. 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. profile The name of the profile configuration to use. Defaults to github . CLI Example: salt myminion github.add_repo 'repo_name' New in version 2016.11.0. salt.modules.github. edit_team ( name , description = None , privacy = None , permission = None , profile = 'github' ) # Updates an existing Github team. name The name of the team to be edited. description The description of the team. privacy The level of privacy for the team, can be 'secret' or 'closed'. permission The default permission for new repositories added to the team, can be 'pull', 'push' or 'admin'. profile The name of the profile configuration to use.
Defaults to github . CLI Example: salt myminion github.edit_team 'team_name' description = 'Team description' New in version 2016.11.0. salt.modules.github. get_issue ( issue_number , repo_name = None , profile = 'github' , output = 'min' ) # Return information about a single issue in a named repository. New in version 2016.11.0. issue_number The number of the issue to retrieve. repo_name The name of the repository from which to get the issue.
This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided. profile The name of the profile configuration to use. Defaults to github . output The amount of data returned by each issue. Defaults to min . Change to full to see all issue output. CLI Example: salt myminion github.get_issue 514 salt myminion github.get_issue 514 repo_name = salt salt.modules.github. get_issue_comments ( issue_number , repo_name = None , profile = 'github' , since = None , output = 'min' ) # Return information about the comments for a given issue in a named repository.
New in version 2016.11.0. issue_number The number of the issue for which to retrieve comments. repo_name The name of the repository to which the issue belongs. This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided. profile The name of the profile configuration to use. Defaults to github . since Only comments updated at or after this time are returned.
This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ . output The amount of data returned by each issue. Defaults to min . Change to full to see all issue output. CLI Example: salt myminion github.get_issue_comments 514 salt myminion github.get_issue 514 repo_na
The rest of this page is on the live site.