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

Function buildWorkflowCallId

actions/setup/js/aw_context.cjs:105–116  ·  view source on GitHub ↗

* Builds a workflow-call identifier for the current workflow invocation. * * GitHub reusable workflows share the same run ID as their caller, so the * workflow ref is appended when available to distinguish parent and child * workflow invocations inside a single run. * * @param {string | number

(runId, runAttempt, workflowRef)

Source from the content-addressed store, hash-verified

103 * @returns {string}
104 */
105function buildWorkflowCallId(runId, runAttempt, workflowRef) {
106 const normalizedRunId = String(runId ?? "").trim();
107 if (!normalizedRunId) {
108 return "";
109 }
110
111 const normalizedRunAttempt = String(runAttempt ?? "").trim() || "1";
112 const normalizedWorkflowRef = typeof workflowRef === "string" ? workflowRef.trim() : "";
113 const baseId = `${normalizedRunId}-${normalizedRunAttempt}`;
114
115 return normalizedWorkflowRef ? `${baseId}:${normalizedWorkflowRef}` : baseId;
116}
117
118/**
119 * @param {unknown} value

Callers 2

buildAwContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected