Help us shape the future of Go! Take the 2026 Go Developer Survey

label

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package label implements the pr label command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdLabel

func NewCmdLabel(f *cmdutil.Factory, runF func(*LabelOptions) error) *cobra.Command

NewCmdLabel creates the label command

Types

type LabelOptions

type LabelOptions struct {
	IO         *iostreams.IOStreams
	HttpClient func() (*http.Client, error)
	BaseRepo   func() (string, error)

	// Arguments
	Repository string
	Number     int

	// Flags
	Add    []string
	Remove string
	List   bool
	JSON   bool
}

type LabelResult

type LabelResult struct {
	Number int      `json:"number"`
	Owner  string   `json:"owner"`
	Repo   string   `json:"repo"`
	Action string   `json:"action"`
	Labels []string `json:"labels,omitempty"`
	Label  string   `json:"label,omitempty"` // For remove action
}

LabelResult represents the JSON output for pr label operations

Source Files

  • label.go

Jump to

Keyboard shortcuts

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