mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-06 21:57:51 +09:00
Hide add-matcher and remove-matcher from actions job logs (#36520)
Hides `::add-matcher::`, `##[add-matcher]` and `::remove-matcher` in job step logs. These are used to configure regex matchers to detect lines that should trigger annotation comments on the UI, currently unsupported by Gitea and these have no relevance to the user. --------- Signed-off-by: silverwind <me@silverwind.io> Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
22
web_src/js/components/RepoActionView.test.ts
Normal file
22
web_src/js/components/RepoActionView.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import {shouldHideLine, type LogLine} from './RepoActionView.vue';
|
||||
|
||||
test('shouldHideLine', () => {
|
||||
expect(([
|
||||
{index: 1, message: 'Starting build process', timestamp: 1000},
|
||||
{index: 2, message: '::add-matcher::/home/runner/go/pkg/mod/example.com/tool/matcher.json', timestamp: 1001},
|
||||
{index: 3, message: 'Running tests...', timestamp: 1002},
|
||||
{index: 4, message: '##[add-matcher]/opt/hostedtoolcache/go/1.25.7/x64/matchers.json', timestamp: 1003},
|
||||
{index: 5, message: 'Test suite started', timestamp: 1004},
|
||||
{index: 7, message: 'All tests passed', timestamp: 1006},
|
||||
{index: 8, message: '::remove-matcher owner=go::', timestamp: 1007},
|
||||
{index: 9, message: 'Build complete', timestamp: 1008},
|
||||
] as Array<LogLine>).filter((line) => !shouldHideLine(line)).map((line) => line.message)).toMatchInlineSnapshot(`
|
||||
[
|
||||
"Starting build process",
|
||||
"Running tests...",
|
||||
"Test suite started",
|
||||
"All tests passed",
|
||||
"Build complete",
|
||||
]
|
||||
`);
|
||||
});
|
||||
Reference in New Issue
Block a user