adding worklog related templates

This commit is contained in:
Cory Bennett
2016-08-21 14:27:50 -07:00
parent 6f38b76fd6
commit ab1cd27c1d
+16
View File
@@ -18,6 +18,8 @@ var allTemplates = map[string]string{
"comment": defaultCommentTemplate,
"transition": defaultTransitionTemplate,
"request": defaultDebugTemplate,
"worklog": defaultWorklogTemplate,
"worklogs": defaultWorklogsTemplate,
}
const defaultDebugTemplate = "{{ . | toJson}}\n"
@@ -150,3 +152,17 @@ transition:
id: {{ .transition.id }}
name: {{ .transition.name }}
`
const defaultWorklogTemplate = `# issue: {{ .issue }}
comment: |~
{{ or .comment "" }}
timeSpent: {{ or .timeSpent "" }}
started:
`
const defaultWorklogsTemplate = `{{ range .worklogs }}- # {{.author.name}}, {{.created | age}} ago
comment: {{ or .comment "" }}
timeSpent: {{ .timeSpent }}
{{end}}
`