* 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)
| 11 | * @returns {{workflowName: string, workflowId: string, runId: number, runUrl: string}} Workflow metadata |
| 12 | */ |
| 13 | function 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. |
no test coverage detected