Documentation
¶
Index ¶
- type Gateway
- func (g *Gateway) DeleteBranch(name string) error
- func (g *Gateway) GetPullRequestPatch(number int) (string, error)
- func (g *Gateway) IsOwned(br *github.PullRequestBranch) bool
- func (g *Gateway) ListPullRequestsByBase(branch string) ([]*github.PullRequest, error)
- func (g *Gateway) ListPullRequestsByHead(owner, branch string) ([]*github.PullRequest, error)
- func (g *Gateway) SetPullRequestBase(number int, base string) error
- func (g *Gateway) SquashPullRequest(pr *github.PullRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway is a GitHub gateway that makes actual requests to GitHub.
func NewGatewayForRepository ¶
NewGatewayForRepository builds a new GitHub gateway for the given GitHub repository.
func (*Gateway) DeleteBranch ¶
DeleteBranch deletes the given remote branch.
func (*Gateway) GetPullRequestPatch ¶
GetPullRequestPatch retrieves the raw patch for the given PR. The contents of the patch may be applied using the git-am command.
func (*Gateway) IsOwned ¶
func (g *Gateway) IsOwned(br *github.PullRequestBranch) bool
IsOwned checks if this branch is local to this repository.
func (*Gateway) ListPullRequestsByBase ¶
func (g *Gateway) ListPullRequestsByBase(branch string) ([]*github.PullRequest, error)
ListPullRequestsByBase lists pull requests made against the given merge base.
func (*Gateway) ListPullRequestsByHead ¶
func (g *Gateway) ListPullRequestsByHead(owner, branch string) ([]*github.PullRequest, error)
ListPullRequestsByHead lists pull requests with the given head.
func (*Gateway) SetPullRequestBase ¶
SetPullRequestBase changes the merge base for the given PR.
func (*Gateway) SquashPullRequest ¶
func (g *Gateway) SquashPullRequest(pr *github.PullRequest) error
SquashPullRequest merges given pull request. The title and description are used as-is for the commit message.