github

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

func NewGatewayForRepository(client *github.Client, repo *repo.Repo) *Gateway

NewGatewayForRepository builds a new GitHub gateway for the given GitHub repository.

func (*Gateway) DeleteBranch

func (g *Gateway) DeleteBranch(name string) error

DeleteBranch deletes the given remote branch.

func (*Gateway) GetPullRequestPatch

func (g *Gateway) GetPullRequestPatch(number int) (string, error)

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

func (g *Gateway) SetPullRequestBase(number int, base string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL