expose url for ticket

This commit is contained in:
Olivier Tremblay 2016-05-31 12:41:46 -04:00
parent 5927b657f9
commit 9ef56fd692
No known key found for this signature in database
GPG key ID: 5C6658D49D6AE29F
3 changed files with 9 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"log"
"text/template"
"os"
)
type Search struct {
@ -76,6 +77,10 @@ type Issue struct {
Fields *Fields `json:"fields"`
}
func (i *Issue) URL() string {
return os.Getenv("JIRA_ROOT") + "browse/"+ i.Key
}
func (i *Issue) String() string {
var b = bytes.NewBuffer(nil)
err := issueTmpl.Execute(b, i)