MCPcopy Create free account
hub / github.com/github/gh-aw / parseSetupAwContext

Function parseSetupAwContext

actions/setup/js/send_otlp_span.cjs:184–194  ·  view source on GitHub ↗

* Parse setup-time aw_context passed via environment before aw_info.json exists. * * @param {string | undefined} raw * @returns {Record }

(raw)

Source from the content-addressed store, hash-verified

182 * @returns {Record<string, unknown>}
183 */
184function parseSetupAwContext(raw) {
185 if (typeof raw !== "string" || raw.trim() === "") {
186 return {};
187 }
188 try {
189 const parsed = JSON.parse(raw);
190 return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
191 } catch {
192 return {};
193 }
194}
195
196/**
197 * @param {unknown} value

Callers 1

sendJobSetupSpanFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected