mirror of https://code.forgejo.org/forgejo/runner
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>pull/185/head
commit
feb1a282da
|
@ -392,12 +392,13 @@ func (r *Reporter) handleCommand(originalContent, command, parameters, value str
|
||||||
// Not implemented yet, so just return the original content.
|
// Not implemented yet, so just return the original content.
|
||||||
return &originalContent
|
return &originalContent
|
||||||
case "group":
|
case "group":
|
||||||
// Returning the original content, because I think the frontend
|
// Rewriting into ##[] syntax which the frontend understands
|
||||||
// will use it when rendering the output.
|
content := "##[group]" + value
|
||||||
return &originalContent
|
return &content
|
||||||
case "endgroup":
|
case "endgroup":
|
||||||
// Ditto
|
// Ditto
|
||||||
return &originalContent
|
content := "##[endgroup]"
|
||||||
|
return &content
|
||||||
case "stop-commands":
|
case "stop-commands":
|
||||||
r.stopCommandEndToken = value
|
r.stopCommandEndToken = value
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -96,8 +96,8 @@ func TestReporter_parseLogRow(t *testing.T) {
|
||||||
"::endgroup::",
|
"::endgroup::",
|
||||||
},
|
},
|
||||||
[]string{
|
[]string{
|
||||||
"::group::",
|
"##[group]",
|
||||||
"::endgroup::",
|
"##[endgroup]",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue