Documentation
¶
Overview ¶
Package link implements `ytrack issue link`, and the link type lookup and JSON output that `ytrack issue unlink` shares.
Index ¶
- Constants
- Variables
- func CheckJSON(e *output.Exporter, fields []string, what string) error
- func HostRef(refs []shared.Ref) shared.Ref
- func NewCmdLink(f *cmdutil.Factory) *cobra.Command
- func Refs(args []string) ([]shared.Ref, error)
- func ResolveType(ctx context.Context, c *transport.Client, phrase string) (adapter.LinkEnd, error)
- type Result
Constants ¶
const LinkFieldsHelp = `` /* 370-byte string literal not displayed */
LinkFieldsHelp documents LinkFields for command help.
const TypeHelp = `--type takes a link phrase as the instance's link types define it, such as
"depends on", "is required for", "subtask of", "parent for", "duplicates" or
"relates to"; case is ignored. The phrase picks the direction: "A depends on
B" and "B is required for A" are the same link. An undirected link type also
answers to its name, e.g. "Relates"; a directed type's name, e.g. "Depend",
does not say which way the link goes and is refused. ` + "`ytrack issue link --list-types`" + `
lists the link types with both phrases.
The phrases are the link types' own, the same in every UI language, unlike
the localized command language: ` + "`ytrack issue command A 'depends on B'`" + ` works
only where YouTrack's command language is English.`
TypeHelp documents --type for command help.
Variables ¶
var LinkFields = []string{"issue", "type", "phrase", "direction", "issues"}
LinkFields are the --json fields of a link: the links `--list` prints and the one `issue link` or `issue unlink` changed.
var TypeFields = []string{"id", "name", "sourceToTarget", "targetToSource", "directed"}
TypeFields are the --json fields of a link type (`--list-types`).
Functions ¶
func NewCmdLink ¶
NewCmdLink returns the link command.