mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: conclusion and outcome are no integers (#1136)
* fix: conclusion and outcome are no integers * Change Test Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
ea64a0555d
commit
547b9fd922
3 changed files with 37 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
package exprparser
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
"math"
|
||||
"reflect"
|
||||
|
@ -224,7 +225,16 @@ func (impl *interperterImpl) getPropertyValue(left reflect.Value, property strin
|
|||
return "", nil
|
||||
}
|
||||
|
||||
return fieldValue.Interface(), nil
|
||||
i := fieldValue.Interface()
|
||||
// The type stepStatus int is an integer, but should be treated as string
|
||||
if m, ok := i.(encoding.TextMarshaler); ok {
|
||||
text, err := m.MarshalText()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return string(text), nil
|
||||
}
|
||||
return i, nil
|
||||
|
||||
case reflect.Map:
|
||||
iter := left.MapRange()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue