github_tools package¶
Tools for GitHub interaction.
-
class
github_tools.
GHPRSession
(token, domain, repo, pull_id)[source]¶ Bases:
requests.sessions.Session
A GitHub session for managing a Pull Request.
-
base_url
= None¶
-
-
github_tools.
assign_pr
(owner, repo, pr_number, users, token=None, keep_current=True)[source]¶ Assign PR to a user.
- Parameters
owner (str) – name of user or org that owns the repo containing the PR
repo (str) – name of the repo containing the PR
users (iterable) – iterable of ssos for users to be assigned
token (Optional[str]) – token to authenticate to GitHub. If not provided, the GH_TOKEN environment variable will be checked.
keep_current (bool) – if True, leave current assignees in place, otherwise remove and assign only provided users.