github

package
v0.0.0-...-9e8c656 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2013 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubHost  string = "github.com"
	OAuthAppURL string = "http://owenou.com/gh"
)

Variables

View Source
var DefaultFile string

Functions

This section is empty.

Types

type Config

type Config struct {
	User  string `json:"user"`
	Token string `json:"token"`
}

func (*Config) FetchPassword

func (c *Config) FetchPassword() string

func (*Config) FetchUser

func (c *Config) FetchUser() string

type GitHub

type GitHub struct {
	Project *Project
	// contains filtered or unexported fields
}

func New

func New() *GitHub

func (*GitHub) CiStatus

func (gh *GitHub) CiStatus(sha string) (*octokat.Status, error)

func (*GitHub) CreatePullRequest

func (gh *GitHub) CreatePullRequest(base, head, title, body string) (string, error)

func (*GitHub) CreatePullRequestForIssue

func (gh *GitHub) CreatePullRequestForIssue(base, head, issue string) (string, error)

func (*GitHub) ExpandRemoteUrl

func (gh *GitHub) ExpandRemoteUrl(owner string, isSSH bool) (url string)

func (*GitHub) ForkRepository

func (gh *GitHub) ForkRepository(name, owner string, noRemote bool) (newRemote string, err error)

func (*GitHub) PullRequest

func (gh *GitHub) PullRequest(id string) (*octokat.PullRequest, error)

type Project

type Project struct {
	Name  string
	Owner string
}

func CurrentProject

func CurrentProject() *Project

func ParseProjectFromURL

func ParseProjectFromURL(uu string) (*Project, error)

func (*Project) GitURL

func (p *Project) GitURL(name, owner string, isSSH bool) (url string)

func (*Project) LocalRepo

func (p *Project) LocalRepo() *Repo

func (*Project) LocalRepoWith

func (p *Project) LocalRepoWith(base, head string) *Repo

func (*Project) WebURL

func (p *Project) WebURL(name, owner, path string) string

type Repo

type Repo struct {
	Base    string
	Head    string
	Project *Project
}

func (*Repo) FullBase

func (r *Repo) FullBase() string

func (*Repo) FullHead

func (r *Repo) FullHead() string

Jump to

Keyboard shortcuts

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