factory

package
v3.14.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	Config        *config.Config
	GitRepository *git.Repository
	GraphQLClient graphql.Client
	RestAPIClient *buildkite.Client
	Version       string
	SkipConfirm   bool
	NoInput       bool
}

func New

func New(version string) (*Factory, error)

func (*Factory) SetGlobalFlags added in v3.14.2

func (f *Factory) SetGlobalFlags(cmd *cobra.Command)

SetGlobalFlags reads the global persistent flags and sets them on the factory. This should be called in PreRunE of commands that need to use global flags. It's safe to call multiple times and will only set flags if they're present.

NOTE: Due to Cobra limitations, global flags must be positioned AFTER at least one subcommand. Valid: bk job --yes cancel <id> or bk job cancel --yes <id> Invalid: bk --yes job cancel <id>

Once the CLI is fully migrated to Kong (currently in progress), the limitation will be removed and global flags will work in any position, including: bk --yes job cancel <id>

Jump to

Keyboard shortcuts

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