Documentation ¶
Index ¶
- Constants
- Variables
- func CaptureCrash()
- func DefaultHost() string
- func MatchURL(url string) []string
- type Branch
- type Client
- func (client *Client) CIStatus(project *Project, sha string) (status *octokit.Status, err error)
- func (client *Client) CreateIssue(project *Project, title, body string, labels []string) (issue *octokit.Issue, err error)
- func (client *Client) CreatePullRequest(project *Project, base, head, title, body string) (pr *octokit.PullRequest, err error)
- func (client *Client) CreatePullRequestForIssue(project *Project, base, head, issue string) (pr *octokit.PullRequest, err error)
- func (client *Client) CreateRelease(project *Project, params octokit.ReleaseParams) (release *octokit.Release, err error)
- func (client *Client) CreateRepository(project *Project, description, homepage string, isPrivate bool) (repo *octokit.Repository, err error)
- func (client *Client) FindOrCreateToken(user, password, twoFactorCode string) (token string, err error)
- func (client *Client) ForkRepository(project *Project) (repo *octokit.Repository, err error)
- func (client *Client) GhLatestTagName() (tagName string, err error)
- func (client *Client) IsRepositoryExist(project *Project) bool
- func (client *Client) Issues(project *Project) (issues []octokit.Issue, err error)
- func (client *Client) PullRequest(project *Project, id string) (pr *octokit.PullRequest, err error)
- func (client *Client) Releases(project *Project) (releases []octokit.Release, err error)
- func (client *Client) Repository(project *Project) (repo *octokit.Repository, err error)
- func (client *Client) UploadReleaseAsset(uploadUrl *url.URL, asset *os.File, contentType string) (err error)
- type ClientError
- type Configs
- func (c *Configs) DefaultCredentials() (credentials *Credentials)
- func (c *Configs) PromptFor(host string) *Credentials
- func (c *Configs) PromptForOTP() string
- func (c *Configs) PromptForPassword(host, user string) (pass string)
- func (c *Configs) PromptForUser() (user string)
- func (c *Configs) Save() error
- type Credentials
- type Editor
- type GitHubRepo
- func (r *GitHubRepo) CurrentBranch() (branch *Branch, err error)
- func (r *GitHubRepo) CurrentProject() (project *Project, err error)
- func (r *GitHubRepo) MainProject() (project *Project, err error)
- func (r *GitHubRepo) MasterBranch() (branch *Branch)
- func (r *GitHubRepo) RemoteBranchAndProject(owner string) (branch *Branch, project *Project, err error)
- func (r *GitHubRepo) RemoteByName(name string) (*Remote, error)
- func (r *GitHubRepo) UpstreamProject() (project *Project, err error)
- type Hosts
- type Project
- type Remote
- type URL
Constants ¶
View Source
const ( GitHubHost string = "github.com" GitHubApiHost string = "api.github.com" OAuthAppURL string = "http://owenou.com/gh" )
Variables ¶
View Source
var (
GitHubHostEnv = os.Getenv("GITHUB_HOST")
)
Functions ¶
func CaptureCrash ¶
func CaptureCrash()
func DefaultHost ¶
func DefaultHost() string
Types ¶
type Branch ¶ added in v0.26.0
type Branch struct {
Name string
}
func (*Branch) RemoteName ¶ added in v0.26.0
type Client ¶ added in v0.26.0
type Client struct {
Credentials *Credentials
}
func (*Client) CreateIssue ¶
func (*Client) CreatePullRequest ¶ added in v0.26.0
func (*Client) CreatePullRequestForIssue ¶ added in v0.26.0
func (*Client) CreateRelease ¶
func (*Client) CreateRepository ¶ added in v0.26.0
func (*Client) FindOrCreateToken ¶ added in v0.26.0
func (*Client) ForkRepository ¶ added in v0.26.0
func (client *Client) ForkRepository(project *Project) (repo *octokit.Repository, err error)
func (*Client) GhLatestTagName ¶
func (*Client) IsRepositoryExist ¶ added in v0.26.0
func (*Client) PullRequest ¶ added in v0.26.0
func (*Client) Repository ¶ added in v0.26.0
func (client *Client) Repository(project *Project) (repo *octokit.Repository, err error)
type ClientError ¶
type ClientError struct {
// contains filtered or unexported fields
}
func (*ClientError) Error ¶
func (e *ClientError) Error() string
func (*ClientError) Is2FAError ¶
func (e *ClientError) Is2FAError() bool
type Configs ¶ added in v0.26.0
type Configs struct {
Credentials []Credentials `json:"credentials"`
}
func CreateTestConfigs ¶ added in v0.26.0
Public for testing purpose
func CurrentConfigs ¶ added in v0.26.0
func CurrentConfigs() *Configs
func (*Configs) DefaultCredentials ¶ added in v0.26.0
func (c *Configs) DefaultCredentials() (credentials *Credentials)
func (*Configs) PromptFor ¶ added in v0.26.0
func (c *Configs) PromptFor(host string) *Credentials
func (*Configs) PromptForOTP ¶ added in v0.26.0
func (*Configs) PromptForPassword ¶ added in v0.26.0
func (*Configs) PromptForUser ¶ added in v0.26.0
type Credentials ¶ added in v0.26.0
type Editor ¶
type Editor struct { Program string File string Message string // contains filtered or unexported fields }
func (*Editor) EditTitleAndBody ¶
type GitHubRepo ¶ added in v0.26.0
type GitHubRepo struct {
// contains filtered or unexported fields
}
func LocalRepo ¶ added in v0.26.0
func LocalRepo() *GitHubRepo
func (*GitHubRepo) CurrentBranch ¶ added in v0.26.0
func (r *GitHubRepo) CurrentBranch() (branch *Branch, err error)
func (*GitHubRepo) CurrentProject ¶ added in v0.26.0
func (r *GitHubRepo) CurrentProject() (project *Project, err error)
func (*GitHubRepo) MainProject ¶ added in v0.26.0
func (r *GitHubRepo) MainProject() (project *Project, err error)
func (*GitHubRepo) MasterBranch ¶ added in v0.26.0
func (r *GitHubRepo) MasterBranch() (branch *Branch)
func (*GitHubRepo) RemoteBranchAndProject ¶
func (r *GitHubRepo) RemoteBranchAndProject(owner string) (branch *Branch, project *Project, err error)
func (*GitHubRepo) RemoteByName ¶
func (r *GitHubRepo) RemoteByName(name string) (*Remote, error)
func (*GitHubRepo) UpstreamProject ¶ added in v0.26.0
func (r *GitHubRepo) UpstreamProject() (project *Project, err error)
type Remote ¶
func OriginRemote ¶
Click to show internal directories.
Click to hide internal directories.