types

package
v2.5.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 14 Imported by: 4

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 NoOption

type NoOption struct{}

NoOption empty struct.

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

func (*PRNumbers) Set added in v1.6.0

func (c *PRNumbers) Set(rawValue string) error

Set a slice of PR numbers

func (*PRNumbers) SetValue added in v1.6.0

func (c *PRNumbers) SetValue(val interface{})

SetValue of a slice of PR numbers

func (*PRNumbers) String added in v1.6.0

func (c *PRNumbers) String() string

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

type Repository struct {
	Owner string
	Name  string
}

Repository Git repository model.

func GetRepository

func GetRepository(baseRemote string) (*Repository, error)

GetRepository get repository information by remote name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL