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

Function getWorkflowMetadata

actions/setup/js/workflow_metadata_helpers.cjs:13–20  ·  view source on GitHub ↗

* Get workflow metadata from environment variables and context * This is used by expired entity cleanup scripts to build workflow run URLs * for closing comment footers. * * @param {string} owner - Repository owner * @param {string} repo - Repository name * @returns {{workflowName: string, wor

(owner, repo)

Source from the content-addressed store, hash-verified

11 * @returns {{workflowName: string, workflowId: string, runId: number, runUrl: string}} Workflow metadata
12 */
13function getWorkflowMetadata(owner, repo) {
14 const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow";
15 const workflowId = process.env.GH_AW_WORKFLOW_ID || "";
16 const runId = context.runId ?? 0;
17 const runUrl = buildWorkflowRunUrl({ runId, serverUrl: context.serverUrl }, { owner, repo });
18
19 return { workflowName, workflowId, runId, runUrl };
20}
21
22/**
23 * Build a workflow run URL from the provided context and workflow repository.

Callers 4

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

buildWorkflowRunUrlFunction · 0.85

Tested by

no test coverage detected