types

package
v3.6.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

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

type CloneOptions struct {
	Repo          string
	Organization  string
	NoFork        bool
	UserAsRootDir bool
}

CloneOptions "clone" command options.

type ListOptions

type ListOptions struct {
	All       bool
	SkipEmpty bool
}

ListOptions "list" command options.

type PullOptions

type PullOptions struct {
	Force bool
}

PullOptions "pull" 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

type PushOptions struct {
	Number int // deprecated
	Force  bool
}

PushOptions "push" command options.

type RemoveOptions

type RemoveOptions struct {
	Numbers []int
	All     bool
}

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