Browse Source
Also convert time.Time values to strings and add it to the template values
pull/213/head
MTRNord
8 years ago
No known key found for this signature in database
GPG Key ID: E5B89311FAB91B9F
1 changed files with
3 additions and
0 deletions
-
src/github.com/matrix-org/go-neb/services/circleci/circleci.go
|
|
|
@ -15,6 +15,7 @@ import ( |
|
|
|
"io/ioutil" |
|
|
|
"strconv" |
|
|
|
"github.com/fatih/structs" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
|
// ServiceType of the CircleCI service.
|
|
|
|
@ -131,6 +132,8 @@ func notifToTemplate(n WebhookNotification) map[string]string { |
|
|
|
t[CamelCaseToUnderscore(key)] = value |
|
|
|
case int: |
|
|
|
t[CamelCaseToUnderscore(key)] = strconv.Itoa(value) |
|
|
|
case time.Time: |
|
|
|
t[CamelCaseToUnderscore(key)] = value.String() |
|
|
|
} |
|
|
|
} |
|
|
|
return t |
|
|
|
|