mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 21:43:32 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28d92eb659 | |||
| d16db04e58 | |||
| 4d74554300 |
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# 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
|
## 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)]
|
* [[#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)]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
var log = logging.MustGetLogger("jira")
|
var log = logging.MustGetLogger("jira")
|
||||||
|
|
||||||
const VERSION = "1.0.11"
|
const VERSION = "1.0.12"
|
||||||
|
|
||||||
type Jira struct {
|
type Jira struct {
|
||||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||||
|
|||||||
@@ -65,6 +65,14 @@ func TemplateProcessor() *template.Template {
|
|||||||
"jira": func() string {
|
"jira": func() string {
|
||||||
return os.Args[0]
|
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) {
|
"toJson": func(content interface{}) (string, error) {
|
||||||
bytes, err := json.MarshalIndent(content, "", " ")
|
bytes, err := json.MarshalIndent(content, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user