mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 09:06:46 +09:00
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
This commit is contained in:
1 parent
f690ea8efd
commit
7e62dda791
1 file changed
+1
-1
@@ -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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user