salt.modules.github module

Module for interop with the Github v3 API

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
salt.modules.github.add_user(name, profile='github', **kwargs)

Add a github user

CLI Example:

salt myminion github.add_user 'github-handle'
salt.modules.github.get_user(name, profile='github', **kwargs)

Get a github user by name

CLI Example:

salt myminion github.get_user 'github-handle' user_details=false salt myminion github.get_user 'github-handle' user_details=true
salt.modules.github.list_users(profile='github')

List all users

CLI Example:

salt myminion github.list_users
salt.modules.github.remove_user(name, profile='github', **kwargs)

remove a Github user by name

CLI Example:

salt myminion github.remove_user github-handle