From 9e0e9e45acaf5cb22d3fca3ec30983b48b9a13e4 Mon Sep 17 00:00:00 2001 From: Sumit Date: Thu, 28 May 2026 10:52:26 +0530 Subject: [PATCH] fix: support ##[command] log prefix in action run UI (#37882) The Actions log parser only recognized `[command]`, so runner command output emitted as `##[command] ...` was not shown in expanded step logs. Add `##[command]` support to `LogLinePrefixCommandMap` in `web_src/js/components/ActionRunView.ts` and cover it with a regression test in `web_src/js/components/ActionRunView.test.ts`. Changes - Fixes Actions UI log rendering for runner command output - Adds support for ##[command] in the Actions log parser - Ensures runner echo ... lines are rendered when expanding step logs - Includes a regression test covering ##[command] foo parsing Co-authored-by: Lunny Xiao --- web_src/js/components/ActionRunView.test.ts | 1 + web_src/js/components/ActionRunView.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/web_src/js/components/ActionRunView.test.ts b/web_src/js/components/ActionRunView.test.ts index 1f972b73c0d..b625b15e717 100644 --- a/web_src/js/components/ActionRunView.test.ts +++ b/web_src/js/components/ActionRunView.test.ts @@ -16,6 +16,7 @@ test('LogLineMessage', () => { '::warning file=test.js,line=1::foo': 'Warning: foo', '::notice::foo': 'Notice: foo', '::debug::foo': 'Debug: foo', + '##[command] foo': ' foo', '[command] foo': ' foo', // hidden is special, it is actually skipped before creating diff --git a/web_src/js/components/ActionRunView.ts b/web_src/js/components/ActionRunView.ts index 91fe8329bd0..a9a6695241a 100644 --- a/web_src/js/components/ActionRunView.ts +++ b/web_src/js/components/ActionRunView.ts @@ -20,6 +20,7 @@ const LogLinePrefixCommandMap: Record = { '##[warning]': 'warning', '##[notice]': 'notice', '##[debug]': 'debug', + '##[command]': 'command', '[command]': 'command', // https://github.com/actions/toolkit/blob/master/docs/commands.md