saltext.github.utils.gh.milestones¶
Operations on GitHub repository milestones.
- saltext.github.utils.gh.milestones.get(conn, repo_name, number, *, owner=None)[source]¶
Return the raw data of a single milestone.
- conn
GitHubConnectionto use.- repo_name
Repository the milestone belongs to.
- number
Milestone number to retrieve.
- owner
Owner of the repository. Defaults to the connection’s owner.
- saltext.github.utils.gh.milestones.list_all(conn, repo_name, *, state='open', sort='due_on', direction='asc', per_page=None, owner=None)[source]¶
Return the raw data of all milestones in a repository matching the search options.
- conn
GitHubConnectionto use.- repo_name
Repository whose milestones to list.
- state
Filter milestones by their state. Either
open,closed, orall. Default isopen.- sort
Field to sort results by. Either
due_onorcompleteness. Default isdue_on.- direction
Sort direction. Either
ascordesc. Default isasc.- per_page
Pagination size, maximum 100.
- owner
Owner of the repository. Defaults to the connection’s owner.
- saltext.github.utils.gh.milestones.find_by_title(conn, repo_name, title, *, owner=None)[source]¶
Return a milestone by its title. Since the GitHub API only addresses milestones by number, this searches the complete list.
- conn
GitHubConnectionto use.- repo_name
Name of the repository the milestone is part of.
- title
Title of the milestone.
- owner
Owner of the repository. Defaults to the connection’s owner.
Raises
GitHubNotFoundErrorif no milestone carries the title.