Skip to content

Commit

Permalink
adding worklog related templates
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Aug 21, 2016
1 parent 6f38b76 commit ab1cd27
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var allTemplates = map[string]string{
"comment": defaultCommentTemplate,
"transition": defaultTransitionTemplate,
"request": defaultDebugTemplate,
"worklog": defaultWorklogTemplate,
"worklogs": defaultWorklogsTemplate,
}

const defaultDebugTemplate = "{{ . | toJson}}\n"
Expand Down Expand Up @@ -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}}
`

0 comments on commit ab1cd27

Please sign in to comment.