Accept reader as a valid type for bodyReader
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Elara 2023-06-26 19:28:00 -07:00
parent f5c8ba2282
commit d90da5dcf9
1 changed files with 2 additions and 0 deletions

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())
}