From 8f28973dad118d509fd3797fbd4d01ca7f62d1ef Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 28 Feb 2026 18:53:50 +0000 Subject: [PATCH 1/2] refactor: apply project conventions to generate_aw_info.cjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move fs require to module level (consistent with all other .cjs files) - Simplify null check: ctx[field] === undefined || ctx[field] === null → ctx[field] == null - Replace console.log with core.info per project JavaScript conventions (AGENTS.md) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- actions/setup/js/generate_aw_info.cjs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/actions/setup/js/generate_aw_info.cjs b/actions/setup/js/generate_aw_info.cjs index 138f080520..210b0982b0 100644 --- a/actions/setup/js/generate_aw_info.cjs +++ b/actions/setup/js/generate_aw_info.cjs @@ -1,6 +1,7 @@ // @ts-check /// +const fs = require("fs"); const { TMP_GH_AW_PATH } = require("./constants.cjs"); const { generateWorkflowOverview } = require("./generate_workflow_overview.cjs"); @@ -16,12 +17,10 @@ const { generateWorkflowOverview } = require("./generate_workflow_overview.cjs") * @returns {Promise} */ async function main(core, ctx) { - const fs = require("fs"); - // Validate required context variables const requiredContextFields = ["runId", "runNumber", "sha", "ref", "actor", "eventName", "repo"]; for (const field of requiredContextFields) { - if (ctx[field] === undefined || ctx[field] === null) { + if (ctx[field] == null) { core.warning(`GitHub Actions context.${field} is not set`); } } @@ -75,8 +74,8 @@ async function main(core, ctx) { fs.mkdirSync(TMP_GH_AW_PATH, { recursive: true }); const tmpPath = TMP_GH_AW_PATH + "/aw_info.json"; fs.writeFileSync(tmpPath, JSON.stringify(awInfo, null, 2)); - console.log("Generated aw_info.json at:", tmpPath); - console.log(JSON.stringify(awInfo, null, 2)); + core.info("Generated aw_info.json at: " + tmpPath); + core.info(JSON.stringify(awInfo, null, 2)); // Set model as output for reuse in other steps/jobs core.setOutput("model", awInfo.model); From ba20c3b10e7347edc99eb49eb5f7f4a6f4a0e745 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 28 Feb 2026 18:55:20 +0000 Subject: [PATCH 2/2] ci: trigger CI checks