Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByRemoteName ¶ added in v1.3.0
type ByRemoteName []Remote
ByRemoteName sort remote by name.
func (ByRemoteName) Len ¶ added in v1.3.0
func (r ByRemoteName) Len() int
func (ByRemoteName) Less ¶ added in v1.3.0
func (r ByRemoteName) Less(i, j int) bool
func (ByRemoteName) Swap ¶ added in v1.3.0
func (r ByRemoteName) Swap(i, j int)
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 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"` }
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 { Number int `short:"n" description:"PR number."` All bool `description:"All PR."` }
RemoveOptions "remove" command options.
type Repository ¶
Repository Git repository model.