saltext.github.utils.gh.users¶
Operations on arbitrary GitHub user accounts, independent of any organization membership.
- saltext.github.utils.gh.users.get_info(conn, login=None, *, expect=None)[source]¶
Return the public profile of any user or organization account (distinguished via the returned
typefield).- conn
GitHubConnectionto use.- login
Account handle to look up. Defaults to the connection’s owner, or to the token’s user when
expectisUser.- expect
Required account type, either
UserorOrganization. By default, both types are allowed.
Raises
GitHubNotFoundErrorif the account does not exist or is not of theexpect-ed type.
- saltext.github.utils.gh.users.list_keys(conn, login=None)[source]¶
Return the verified public SSH keys of any user as a list of mappings with
idandkeyfields.- conn
GitHubConnectionto use.- login
User handle whose keys to list. Defaults to the user the connection’s token belongs to.
Raises
GitHubNotFoundErrorif the user does not exist.