github

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: MIT Imports: 4 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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