mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-21 12:17:17 +03:00
Merge pull request 'Handle group commands' (#183) from Mai-Lapyst/runner:handle-group-commands into main
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/183 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
commit
feb1a282da
2 changed files with 7 additions and 6 deletions
|
@ -392,12 +392,13 @@ func (r *Reporter) handleCommand(originalContent, command, parameters, value str
|
|||
// Not implemented yet, so just return the original content.
|
||||
return &originalContent
|
||||
case "group":
|
||||
// Returning the original content, because I think the frontend
|
||||
// will use it when rendering the output.
|
||||
return &originalContent
|
||||
// Rewriting into ##[] syntax which the frontend understands
|
||||
content := "##[group]" + value
|
||||
return &content
|
||||
case "endgroup":
|
||||
// Ditto
|
||||
return &originalContent
|
||||
content := "##[endgroup]"
|
||||
return &content
|
||||
case "stop-commands":
|
||||
r.stopCommandEndToken = value
|
||||
return nil
|
||||
|
|
|
@ -96,8 +96,8 @@ func TestReporter_parseLogRow(t *testing.T) {
|
|||
"::endgroup::",
|
||||
},
|
||||
[]string{
|
||||
"::group::",
|
||||
"::endgroup::",
|
||||
"##[group]",
|
||||
"##[endgroup]",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue