Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckoutOptions ¶
type CheckoutOptions struct {
Number int `short:"n" description:"PR number."`
}
CheckoutOptions "checkout" command options.
type ListOptions ¶
type ListOptions struct {
All bool `description:"All PR."`
}
ListOptions "list" command options.
type PRNumbers ¶ added in v1.6.0
type PRNumbers []int
PRNumbers Slice of PR numbers
func (*PRNumbers) Get ¶ added in v1.6.0
func (c *PRNumbers) Get() interface{}
Get a slice of PR numbers
type PullOptions ¶ added in v1.3.0
type PullOptions struct {
Force bool `short:"f" description:"Force the push."`
}
PullOptions "pull" command options.
type PullRequest ¶
type PullRequest struct {
Owner string `json:"owner,omitempty"`
BranchName string `json:"branch_name,omitempty"`
Number int `json:"number,omitempty"`
Project string `json:"project,omitempty"`
CloneURL string `json:"clone_url,omitempty"`
}
PullRequest the pull request model.
func (*PullRequest) Checkout ¶
func (pr *PullRequest) Checkout(newBranch bool) error
Checkout checkout the branch related to the pull request into the local git repository.
func (*PullRequest) Pull ¶ added in v1.3.0
func (pr *PullRequest) Pull(force bool) error
Pull pull the PR from the remote git repository.
func (*PullRequest) Push ¶ added in v1.2.0
func (pr *PullRequest) Push(force bool) error
Push push the pull request to the remote git repository.
func (*PullRequest) Remove ¶
func (pr *PullRequest) Remove() error
Remove remove the pull request from the local git repository.
func (*PullRequest) RemoveRemote ¶
func (pr *PullRequest) RemoveRemote() error
RemoveRemote remove the remote of the pull request from the local git repository.
type PushOptions ¶ added in v1.2.0
type PushOptions struct {
Number int `short:"n" description:"PR number (optional: parse the branch name)."`
Force bool `short:"f" description:"Force the push."`
}
PushOptions "push" command options.
type RemoveOptions ¶
type RemoveOptions struct {
Numbers PRNumbers `short:"n" description:"PRs numbers."`
All bool `description:"All PR."`
NoPrompt bool `short:"d" description:"Disable interactive prompt."`
}
RemoveOptions "remove" command options.
type Repository ¶
Repository Git repository model.
func GetRepository ¶
func GetRepository(baseRemote string) (*Repository, error)
GetRepository get repository information by remote name.