Compare commits

..

3 Commits

Author SHA1 Message Date
Cory Bennett 28d92eb659 version bump 2017-10-04 10:58:50 -04:00
Cory Bennett d16db04e58 Updated Changelog 2017-10-04 10:58:49 -04:00
Cory Bennett 4d74554300 add {{env.VARNAME}} template support to allow use of env vars 2017-10-03 18:47:33 -04:00
3 changed files with 13 additions and 1 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## 1.0.12 - 2017-10-04
* add `{{env.VARNAME}}` template support to allow use of env vars [Cory Bennett] [[4d74554](https://github.com/Netflix-Skunkworks/go-jira/commit/4d74554)]
## 1.0.11 - 2017-09-26
* [[#115](https://github.com/Netflix-Skunkworks/go-jira/issues/115)] fix transition template for description [Cory Bennett] [[986cc78](https://github.com/Netflix-Skunkworks/go-jira/commit/986cc78)]
+1 -1
View File
@@ -7,7 +7,7 @@ import (
var log = logging.MustGetLogger("jira")
const VERSION = "1.0.11"
const VERSION = "1.0.12"
type Jira struct {
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
+8
View File
@@ -65,6 +65,14 @@ func TemplateProcessor() *template.Template {
"jira": func() string {
return os.Args[0]
},
"env": func() map[string]string {
out := map[string]string{}
for _, env := range os.Environ() {
kv := strings.SplitN(env, "=", 2)
out[kv[0]] = kv[1]
}
return out
},
"toJson": func(content interface{}) (string, error) {
bytes, err := json.MarshalIndent(content, "", " ")
if err != nil {