MCPcopy
hub / github.com/cli/cli / fieldIdAndProjectIdPresence

Function fieldIdAndProjectIdPresence

pkg/cmd/project/item-edit/item_edit.go:342–354  ·  view source on GitHub ↗
(config editItemConfig)

Source from the content-addressed store, hash-verified

340}
341
342func fieldIdAndProjectIdPresence(config editItemConfig) error {
343 if config.opts.fieldID == "" && config.opts.projectID == "" {
344 return cmdutil.FlagErrorf("field-id and project-id must be provided")
345 }
346 if config.opts.fieldID == "" {
347 return cmdutil.FlagErrorf("field-id must be provided")
348 }
349 if config.opts.projectID == "" {
350 // TODO: offer to fetch interactively
351 return cmdutil.FlagErrorf("project-id must be provided")
352 }
353 return nil
354}

Callers 2

clearItemFieldValueFunction · 0.85
updateItemValuesFunction · 0.85

Calls 1

FlagErrorfFunction · 0.92

Tested by

no test coverage detected