Pipeline errors must be an array (#3276)

This PR addresses 
``json: cannot unmarshal array into Go struct field Pipeline.errors of
type woodpecker.PipelineError``
when executing 
``woodpecker-cli pipeline ls X``

According to API schema, pipeline.errors should contain an array

Fixes #3119

Co-authored-by: Alberto Alcón <albertoalcon@bit2me.com>
This commit is contained in:
Alconety 2024-01-25 19:16:56 +01:00 committed by GitHub
parent d9079b9051
commit 8c63c7a836
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,7 +74,7 @@ type (
Parent int64 `json:"parent"`
Event string `json:"event"`
Status string `json:"status"`
Errors PipelineError `json:"errors"`
Errors []*PipelineError `json:"errors"`
// Deprecated TODO remove in 3.x
Enqueued int64 `json:"enqueued_at"`
Created int64 `json:"created_at"`