expose url for ticket
This commit is contained in:
parent
5927b657f9
commit
9ef56fd692
3 changed files with 9 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type listissue jkl.Issue
|
type listissue jkl.Issue
|
||||||
|
func (l *listissue) URL() string {
|
||||||
|
i := jkl.Issue(*l)
|
||||||
|
return (&i).URL()
|
||||||
|
}
|
||||||
|
|
||||||
func (l *listissue) Color() string {
|
func (l *listissue) Color() string {
|
||||||
if os.Getenv("JKLNOCOLOR") == "true" || !terminal.IsTerminal(int(os.Stdout.Fd())) {
|
if os.Getenv("JKLNOCOLOR") == "true" || !terminal.IsTerminal(int(os.Stdout.Fd())) {
|
||||||
|
|
|
||||||
0
cmd/jklfs/jklfs
Executable file → Normal file
0
cmd/jklfs/jklfs
Executable file → Normal file
5
issue.go
5
issue.go
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Search struct {
|
type Search struct {
|
||||||
|
|
@ -76,6 +77,10 @@ type Issue struct {
|
||||||
Fields *Fields `json:"fields"`
|
Fields *Fields `json:"fields"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *Issue) URL() string {
|
||||||
|
return os.Getenv("JIRA_ROOT") + "browse/"+ i.Key
|
||||||
|
}
|
||||||
|
|
||||||
func (i *Issue) String() string {
|
func (i *Issue) String() string {
|
||||||
var b = bytes.NewBuffer(nil)
|
var b = bytes.NewBuffer(nil)
|
||||||
err := issueTmpl.Execute(b, i)
|
err := issueTmpl.Execute(b, i)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue