From 38868387a9160a6c307bc7e96345ae07ba28eb68 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:05:25 +0000 Subject: [PATCH 1/2] Initial plan From 92bde89e1bd5ad41abb106fda178d72ac9f3e70b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:22:31 +0000 Subject: [PATCH 2/2] lower front matter warning to debug log in runtime import Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/runtime_import.cjs | 4 ++-- actions/setup/js/runtime_import.test.cjs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/setup/js/runtime_import.cjs b/actions/setup/js/runtime_import.cjs index 0a1eb5aa182..8e3cc5e29eb 100644 --- a/actions/setup/js/runtime_import.cjs +++ b/actions/setup/js/runtime_import.cjs @@ -553,7 +553,7 @@ async function processUrlImport(url, optional, startLine, endLine) { // Check for front matter and warn if (hasFrontMatter(content)) { - core.warning(`URL ${url} contains front matter which will be ignored in runtime import`); + core.debug(`URL ${url} contains front matter which will be ignored in runtime import`); // Remove front matter (everything between first --- and second ---) const lines = content.split("\n"); let inFrontMatter = false; @@ -814,7 +814,7 @@ async function processRuntimeImport(filepathOrUrl, optional, workspaceDir, start // Check for front matter and warn if (hasFrontMatter(content)) { - core.warning(`File ${filepath} contains front matter which will be ignored in runtime import`); + core.debug(`File ${filepath} contains front matter which will be ignored in runtime import`); // Remove front matter (everything between first --- and second ---) const lines = content.split("\n"); let inFrontMatter = false; diff --git a/actions/setup/js/runtime_import.test.cjs b/actions/setup/js/runtime_import.test.cjs index aee6aff224d..10de0b8424e 100644 --- a/actions/setup/js/runtime_import.test.cjs +++ b/actions/setup/js/runtime_import.test.cjs @@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import fs from "fs"; import path from "path"; import os from "os"; -const core = { info: vi.fn(), warning: vi.fn(), setFailed: vi.fn() }; +const core = { info: vi.fn(), warning: vi.fn(), debug: vi.fn(), setFailed: vi.fn() }; global.core = core; const { processRuntimeImports, processRuntimeImport, hasFrontMatter, removeXMLComments, hasGitHubActionsMacros, isSafeExpression, evaluateExpression } = require("./runtime_import.cjs"); describe("runtime_import", () => { @@ -365,14 +365,14 @@ describe("runtime_import", () => { const result = await processRuntimeImport("missing.md", !0, tempDir); (expect(result).toBe(""), expect(core.warning).toHaveBeenCalledWith("Optional runtime import file not found: workflows/missing.md")); }), - it("should remove front matter and warn", async () => { + it("should remove front matter and log debug message", async () => { const filepath = "with-frontmatter.md"; fs.writeFileSync(path.join(workflowsDir, filepath), "---\ntitle: Test\nkey: value\n---\n\n# Content\n\nActual content."); const result = await processRuntimeImport(filepath, !1, tempDir); (expect(result).toContain("# Content"), expect(result).toContain("Actual content."), expect(result).not.toContain("title: Test"), - expect(core.warning).toHaveBeenCalledWith(`File workflows/${filepath} contains front matter which will be ignored in runtime import`)); + expect(core.debug).toHaveBeenCalledWith(`File workflows/${filepath} contains front matter which will be ignored in runtime import`)); }), it("should remove XML comments", async () => { fs.writeFileSync(path.join(workflowsDir, "with-comments.md"), "# Title\n\n\x3c!-- This is a comment --\x3e\n\nContent here.");