Documentation ¶
Index ¶
- Constants
- Variables
- func MatchURL(url string) []string
- func SaveConfig(config *Config) error
- type Config
- type GitHub
- func (gh *GitHub) CiStatus(sha string) (*octokat.Status, error)
- func (gh *GitHub) CreatePullRequest(base, head, title, body string) (string, error)
- func (gh *GitHub) CreatePullRequestForIssue(base, head, issue string) (string, error)
- func (gh *GitHub) CreateRepository(project Project, description, homepage string, isPrivate bool) (*octokat.Repository, error)
- func (gh *GitHub) ExpandRemoteUrl(owner, name string, isSSH bool) (url string)
- func (gh *GitHub) ForkRepository(name, owner string, noRemote bool) (repo *octokat.Repository, err error)
- func (gh *GitHub) IsRepositoryExist(project Project) bool
- func (gh *GitHub) PullRequest(id string) (*octokat.PullRequest, error)
- func (gh *GitHub) Repository(project Project) (*octokat.Repository, error)
- type Project
- type Repo
Constants ¶
View Source
const ( GitHubHost string = "github.com" OAuthAppURL string = "http://owenou.com/gh" )
Variables ¶
View Source
var (
DefaultConfigFile = filepath.Join(os.Getenv("HOME"), ".config", "gh")
)
Functions ¶
func SaveConfig ¶
Types ¶
type Config ¶
func CurrentConfig ¶
func CurrentConfig() *Config
func (*Config) FetchCredentials ¶
func (c *Config) FetchCredentials()
func (*Config) FetchPassword ¶
type GitHub ¶
func (*GitHub) CreatePullRequest ¶
func (*GitHub) CreatePullRequestForIssue ¶
func (*GitHub) CreateRepository ¶
func (*GitHub) ExpandRemoteUrl ¶
func (*GitHub) ForkRepository ¶
func (*GitHub) IsRepositoryExist ¶
TODO: detach GitHub from Project
func (*GitHub) PullRequest ¶
func (gh *GitHub) PullRequest(id string) (*octokat.PullRequest, error)
func (*GitHub) Repository ¶
func (gh *GitHub) Repository(project Project) (*octokat.Repository, error)
type Project ¶
func CurrentProject ¶
func CurrentProject() *Project
func ParseProjectFromURL ¶
func (*Project) LocalRepoWith ¶
Click to show internal directories.
Click to hide internal directories.