Documentation ¶
Index ¶
- func AddLabels(repo string, pr *PullRequest) error
- func CreatePr(rpo string, pr *PullRequest) error
- func GetStatus(rpo, sha string) (string, error)
- func PreviewPr(rpo, dir, branchFrom string, pr PullRequest)
- type Branch
- type Check
- type Commit
- type Label
- type PullRequest
- type Ref
- type Release
- type Repo
- type RepoFilter
- type SearchResult
- type Status
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePr ¶
func CreatePr(rpo string, pr *PullRequest) error
func PreviewPr ¶
func PreviewPr(rpo, dir, branchFrom string, pr PullRequest)
Types ¶
type Branch ¶
Branch represents a GitHub branch API schema.
func SearchBranch ¶
SearchBranch returns a branch for the given repo and branch name.
type Check ¶
func GetStatusCheck ¶
type PullRequest ¶
type PullRequest struct { Number int Url string `json:"html_url"` ApiUrl string `json:"url"` Body string Title string Labels []Label `json:"labels"` State string User User Draft bool Mergeable bool Head Repo Base Repo RequestedReviewers []User `json:"requested_reviewers"` MergeCommit string `json:"merge_commit_sha"` // This field is not part of the GH api but is useful // to get the context of the PR when passing it around Repo string // This field is not part of the GH api // It's used to suggest if a PR is for a release // or not. ReleaseVersion string }
func GetPrs ¶
func GetPrs(rpo string, numbers []string) (prs []PullRequest)
func SearchPr ¶
func SearchPr(filter RepoFilter) (PullRequest, error)
Returns a single PR with all the details given a filter. Returns an error if more than one PR is found.
type Release ¶
type Release struct { TagName string `json:"tag_name"` Url string `json:"html_url"` Name string Draft bool Prerelease bool Target string `json:"target_commitish"` PublishedAt string `json:"published_at"` }
func GetReleaseByTag ¶
type RepoFilter ¶
RepoFilter is used to filter PRs by repo and query.
func BuildRepoFilter ¶
func BuildRepoFilter(rpo string, queries ...string) RepoFilter
Build a RepoFilter from a repo name and a list of queries.
type SearchResult ¶
type SearchResult struct { Filter RepoFilter TotalCount int `json:"total_count"` Items []PullRequest }
SearchResult is used to return a list of PRs from a search.
func SearchPrs ¶
func SearchPrs(filter RepoFilter) (SearchResult, error)
SearchPrs returns a list of PRs for the given repo and filter.
type Status ¶
func GetStatusChecks ¶
type Tag ¶
Click to show internal directories.
Click to hide internal directories.