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

utils

package
v1.124.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Group-level work items
	TypeEpic      = "EPIC"
	TypeObjective = "OBJECTIVE"
	TypeKeyResult = "KEY_RESULT"
	// Project-level work items
	TypeIssue       = "ISSUE"
	TypeTask        = "TASK"
	TypeIncident    = "INCIDENT"
	TypeTicket      = "TICKET"
	TypeRequirement = "REQUIREMENT"
	TypeTestCase    = "TEST_CASE"
)

IssueType enum values from GitLab GraphQL API Used in workItems(types: [IssueType!]) filter parameter NOTE: These types will become customizable in future GitLab releases. This list is for reference only - API is source of truth for validation.

Variables

AllKnownTypes contains current default work item types for reference. NOTE: This list will become outdated when work item types become customizable. Do not use for validation - API is the source of truth.

Functions

func DetectScope

func DetectScope(groupFlag string, baseRepo func() (glrepo.Interface, error)) (*api.ScopeInfo, error)

DetectScope determines the appropriate scope (group or project) for work items queries.

func DisplayWorkItemList

func DisplayWorkItemList(streams *iostreams.IOStreams, workItems []api.WorkItem) string

DisplayWorkItemList formats and displays work items as a table

func ResolveTypeID added in v1.94.0

func ResolveTypeID(t string) (gitlab.WorkItemTypeID, error)

ResolveTypeID will resolve the work item ID based on the type provided

func ValidTypeNames added in v1.94.0

func ValidTypeNames() []string

ValidTypeNames provides a list of the available type names as needed

func ValidateTypes

func ValidateTypes(types []string) error

ValidateTypes performs minimal format validation on work item types. Only checks that types are non-empty and non-whitespace. The GraphQL API is responsible for validating actual type names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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