Browse Source

Also convert time.Time values to strings and add it to the template values

pull/213/head
MTRNord 8 years ago
parent
commit
e72f90877a
No known key found for this signature in database GPG Key ID: E5B89311FAB91B9F
  1. 3
      src/github.com/matrix-org/go-neb/services/circleci/circleci.go

3
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

Loading…
Cancel
Save