MCPcopy Create free account
hub / github.com/cli/cli / ExportData

Method ExportData

pkg/cmd/issue/artifact/client/types.go:140–150  ·  view source on GitHub ↗

ExportData returns the requested fields for --json output, where versions is the edit history, newest first. Fields the API returned as null stay null.

(fields []string)

Source from the content-addressed store, hash-verified

138// is the edit history, newest first. Fields the API returned as null stay
139// null.
140func (a ArtifactWithVersions) ExportData(fields []string) map[string]any {
141 data := a.Artifact.ExportData(fields)
142 if slices.Contains(fields, "versions") {
143 versions := make([]map[string]any, 0, len(a.Versions))
144 for _, v := range a.Versions {
145 versions = append(versions, v.export())
146 }
147 data["versions"] = versions
148 }
149 return data
150}
151
152func (v Version) export() map[string]any {
153 return map[string]any{

Callers

nothing calls this directly

Calls 3

ContainsMethod · 0.80
ExportDataMethod · 0.65
exportMethod · 0.45

Tested by

no test coverage detected