mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-28 07:45:27 +00:00
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 <xiaolunwen@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ test('LogLineMessage', () => {
|
||||
'::warning file=test.js,line=1::foo': '<span class="log-msg log-cmd-warning"><span class="log-msg-label">Warning:</span><span> foo</span></span>',
|
||||
'::notice::foo': '<span class="log-msg log-cmd-notice"><span class="log-msg-label">Notice:</span><span> foo</span></span>',
|
||||
'::debug::foo': '<span class="log-msg log-cmd-debug"><span class="log-msg-label">Debug:</span><span> foo</span></span>',
|
||||
'##[command] foo': '<span class="log-msg log-cmd-command"> foo</span>',
|
||||
'[command] foo': '<span class="log-msg log-cmd-command"> foo</span>',
|
||||
|
||||
// hidden is special, it is actually skipped before creating
|
||||
|
||||
@@ -20,6 +20,7 @@ const LogLinePrefixCommandMap: Record<string, LogLineCommandName> = {
|
||||
'##[warning]': 'warning',
|
||||
'##[notice]': 'notice',
|
||||
'##[debug]': 'debug',
|
||||
'##[command]': 'command',
|
||||
'[command]': 'command',
|
||||
|
||||
// https://github.com/actions/toolkit/blob/master/docs/commands.md
|
||||
|
||||
Reference in New Issue
Block a user