From 7e62dda79129c5c7b0414a852c75a0768a0e57f0 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 18 Oct 2026 20:04:39 +0200 Subject: [PATCH] chore(actions): update stale go-yaml wrapping comment (#39844) https://github.com/yaml/go-yaml/pull/441 fixed the wrapping bug this comment waited for, so reword it. `WithLineWidth(-1)` stays, wrapping the machine-read payload helps no reader and only adds risk. Runner: https://gitea.com/gitea/runner/pulls/1324 --- modules/actions/jobparser/model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/actions/jobparser/model.go b/modules/actions/jobparser/model.go index ff24374a689..7ef589a58b7 100644 --- a/modules/actions/jobparser/model.go +++ b/modules/actions/jobparser/model.go @@ -86,7 +86,7 @@ func (w *SingleWorkflow) Marshal() ([]byte, error) { return marshalYAML(&payload) } -// marshalYAML never wraps lines, go-yaml wraps more-indented lines of folded scalars until https://github.com/yaml/go-yaml/pull/441 is released. +// marshalYAML never wraps lines, re-encoding must not reflow long values. func marshalYAML(v any) ([]byte, error) { return yaml.Dump(v, yaml.WithV3Defaults(), yaml.WithIndent(2), yaml.WithLineWidth(-1)) }