fix(logs): release rejections cap line length at 1KB (#997)

* fix(debug/release/rejection): cap line length at 1KB from unlimited

* flip to a call limit

* dont die on bad metainfo parse

* death is here to stay, for now.
This commit is contained in:
Kyle Sanderson 2023-07-02 04:58:40 -07:00 committed by GitHub
parent 90b5cc9351
commit 5cdf68bc77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -608,9 +608,14 @@ func (r *Release) resetRejections() {
r.Rejections = []string{}
}
func (r *Release) RejectionsString() string {
func (r *Release) RejectionsString(trim bool) string {
if len(r.Rejections) > 0 {
return strings.Join(r.Rejections, ", ")
out := strings.Join(r.Rejections, ", ")
if trim && len(out) > 1024 {
out = out[:1024]
}
return out
}
return ""
}