saltext.github.utils.gh.pulls

Operations on GitHub repository pull requests.

saltext.github.utils.gh.pulls.list_all(conn, repo_name, *, state='open', head=None, base=None, sort='created', direction='desc', per_page=None, owner=None)[source]

Return the raw data of all pull requests in a repository matching the search options.

conn

GitHubConnection to use.

repo_name

Repository whose pull requests to list.

state

Filter returned pull requests by their state. Can be either open, closed, or all. Default is open.

head

Filter pull requests by head user and branch name in the format user:ref-name.

base

Filter pulls by base branch name, e.g. gh-pages.

sort

Field to sort results by. Either created, updated, popularity (comment count), or long-running (age, filtering by pull requests updated within the last month). Default is created.

direction

Sort direction. Either asc or desc. Default is desc.

per_page

Pagination size, maximum 100.

owner

Owner of the repository. Defaults to the connection’s owner.

saltext.github.utils.gh.pulls.format_pr(pr_)[source]

Format API return information into a more manageable and useful dictionary for pull request information.

Legacy function, only used by deprecated callers.

pr_

Pull request to format.