Accept reader as a valid type for bodyReader
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Elara 2023-06-26 19:28:00 -07:00
parent f5c8ba2282
commit d90da5dcf9

View File

@ -80,6 +80,8 @@ func (sbr *starlarkBodyReader) Unpack(v starlark.Value) error {
sbr.Reader = strings.NewReader(string(v))
case starlark.Bytes:
sbr.Reader = strings.NewReader(string(v))
case starlarkReader:
sbr.Reader = v
default:
return fmt.Errorf("%w: %s", ErrInvalidBodyType, v.Type())
}