cmd

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonOpts

type CommonOpts struct {
	PrepareService func(ctx context.Context) (*service.Service, error)
	Version        string
}

CommonOpts contains common options for all commands.

func (*CommonOpts) Set

func (c *CommonOpts) Set(opts CommonOpts)

type FilterGroup

type FilterGroup struct {
	Include []string `long:"include" description:"list only entries that include the given value"`
	Exclude []string `long:"exclude" description:"list only entries that exclude the given value"`
}

FilterGroup is a group of include/exclude filters

func (FilterGroup) Empty

func (g FilterGroup) Empty() bool

Empty returns true if the filter group is empty.

type List

type List struct {
	CommonOpts
	State                      git.State    `long:"state" description:"list only merge requests with the given state"`
	Labels                     FilterGroup  `group:"labels" namespace:"labels" env-namespace:"LABELS"`
	Authors                    FilterGroup  `group:"authors" namespace:"authors" env-namespace:"AUTHORS"`
	ProjectPaths               FilterGroup  `group:"project-paths" namespace:"project-paths" env-namespace:"PROJECT_PATHS"`
	ApprovedByMe               NillableBool `long:"approved-by-me" choice:"true" choice:"false" description:"list only merge requests approved by me"`
	WithoutMyUnresolvedThreads bool         `` /* 152-byte string literal not displayed */
	NotEnoughApprovals         NillableBool `` /* 202-byte string literal not displayed */
	Sort                       struct {
		By    string         `long:"by" choice:"created" choice:"updated" choice:"title" default:"created" description:"sort by the given field"`
		Order misc.SortOrder `long:"order" choice:"asc" choice:"desc" default:"desc" description:"sort in the given order"`
	} `group:"sort" namespace:"sort" env-namespace:"SORT"`
	Pagination struct {
		Page    int `long:"page" description:"page number"`
		PerPage int `long:"per-page" description:"number of items per page"`
	} `` /* 127-byte string literal not displayed */
	Action       string        `long:"action" choice:"open" choice:"copy" default:"open" description:"action to perform on pressing enter"`
	PollInterval time.Duration `` /* 128-byte string literal not displayed */
}

List lists all merge requests that satisfy the given criteria.

func (List) Execute

func (c List) Execute([]string) error

Execute runs the command.

type NillableBool

type NillableBool string

NillableBool is a bool that can be nil

func Not

Not returns the opposite value of the nillable bool, except for nil, which is nil.

func (NillableBool) Value

func (b NillableBool) Value() *bool

Value returns the value of the bool.

Jump to

Keyboard shortcuts

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