MCPcopy
hub / github.com/cli/cli / OrderBy

Method OrderBy

pkg/cmd/label/http.go:47–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (opts listQueryOptions) OrderBy() map[string]string {
48 // Set on copy to keep original intact.
49 if opts.Order == "" {
50 opts.Order = defaultOrder
51 }
52 if opts.Sort == "" {
53 opts.Sort = defaultSort
54 }
55
56 field := strings.ToUpper(opts.Sort)
57 if opts.Sort == "created" {
58 field = "CREATED_AT"
59 }
60 return map[string]string{
61 "direction": strings.ToUpper(opts.Order),
62 "field": field,
63 }
64}
65
66// listLabels lists the labels in the given repo. Pass -1 for limit to list all labels;
67// otherwise, only that number of labels is returned for any number of pages.

Callers 1

listLabelsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected