@ -26,6 +26,7 @@ import (
_ "github.com/matrix-org/go-neb/services/guggy"
_ "github.com/matrix-org/go-neb/services/jira"
_ "github.com/matrix-org/go-neb/services/rssbot"
_ "github.com/matrix-org/go-neb/services/travisci"
"github.com/matrix-org/go-neb/types"
_ "github.com/mattn/go-sqlite3"
"github.com/prometheus/client_golang/prometheus"
@ -152,6 +152,9 @@ func notifToTemplate(n webhookNotification) map[string]string {
}
func outputForTemplate(travisTmpl string, tmpl map[string]string) (out string) {
if travisTmpl == "" {
travisTmpl = DefaultTemplate
out = travisTmpl
for tmplVar, tmplValue := range tmpl {
out = strings.Replace(out, "%{"+tmplVar+"}", tmplValue, -1)