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
}
CheckoutOptions "checkout" command options.
type CloneOptions ¶
CloneOptions "clone" command options.
type ListOptions ¶
ListOptions "list" command options.
type PullRequest ¶
type PullRequest struct { Owner string `json:"owner,omitempty"` BranchName string `json:"branch_name,omitempty"` Project string `json:"project,omitempty"` CloneURL string `json:"clone_url,omitempty"` Number int `json:"number,omitempty"` }
PullRequest the pull request model.
func (*PullRequest) Checkout ¶
func (pr *PullRequest) Checkout(newBranch bool) error
Checkout checkouts the branch related to the pull request into the local git repository.
func (*PullRequest) Pull ¶
func (pr *PullRequest) Pull(force bool) error
Pull pulls the PR from the remote git repository.
func (*PullRequest) Push ¶
func (pr *PullRequest) Push(force bool) error
Push pushes the pull request to the remote git repository.
func (*PullRequest) Remove ¶
func (pr *PullRequest) Remove(mainBranch string) error
Remove removes the pull request from the local git repository.
func (*PullRequest) RemoveRemote ¶
func (pr *PullRequest) RemoveRemote() error
RemoveRemote removes the remote of the pull request from the local git repository.
type PushOptions ¶
PushOptions "push" command options.
type RemoveOptions ¶
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.