shared

package
v1.135.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package shared holds helpers used across pipeline subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipelineFields

func PipelineFields(f *factory.Factory, cfg format.OutputConfig) *format.Printer[backend.Pipeline]

PipelineFields constructs the formatter used by both `pipeline list` and `pipeline view` so the JSON field names and TTY column layout stay in lock step.

func PipelineStateColor added in v1.17.0

func PipelineStateColor(ios *iostreams.IOStreams) func(string) string

PipelineStateColor maps Bitbucket Cloud pipeline / step state strings to colors. Both Pipeline and PipelineStep share the same state vocabulary, so they share this helper. SUCCESSFUL is green; FAILED / ERROR / STOPPED are red; IN_PROGRESS / PENDING are yellow. Unknown states pass through.

Exported so the few cmd packages outside `shared` (none today, but `pipeline view` could grow that need) can reuse the mapping without re-deriving it.

func StepFields

StepFields constructs the formatter for `pipeline steps`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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