-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package jiracli | ||
|
||
import kingpin "gopkg.in/alecthomas/kingpin.v2" | ||
|
||
func (jc *JiraCli) CmdIssueLinkTypesRegistry() *CommandRegistryEntry { | ||
opts := GlobalOptions{ | ||
Template: "issuelinktypes", | ||
} | ||
|
||
return &CommandRegistryEntry{ | ||
"Show the issue link types", | ||
func() error { | ||
return jc.CmdIssueLinkTypes(&opts) | ||
}, | ||
func(cmd *kingpin.CmdClause) error { | ||
return jc.CmdIssueLinkTypesUsage(cmd, &opts) | ||
}, | ||
} | ||
} | ||
|
||
func (jc *JiraCli) CmdIssueLinkTypesUsage(cmd *kingpin.CmdClause, opts *GlobalOptions) error { | ||
if err := jc.GlobalUsage(cmd, opts); err != nil { | ||
return err | ||
} | ||
jc.TemplateUsage(cmd, opts) | ||
return nil | ||
} | ||
|
||
// CmdIssueLinkTypes will get issue link type data and send to "issuelinktypes" template | ||
func (jc *JiraCli) CmdIssueLinkTypes(opts *GlobalOptions) error { | ||
data, err := jc.GetIssueLinkTypes() | ||
if err != nil { | ||
return err | ||
} | ||
return jc.runTemplate(opts.Template, data, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package jiradata | ||
|
||
///////////////////////////////////////////////////////////////////////// | ||
// This Code is Generated by SlipScheme Project: | ||
// https://github.com/coryb/slipscheme | ||
// | ||
// Generated with command: | ||
// slipscheme -dir jiradata -pkg jiradata schemas/IssueLinkTypes.json | ||
///////////////////////////////////////////////////////////////////////// | ||
// DO NOT EDIT // | ||
///////////////////////////////////////////////////////////////////////// | ||
|
||
// IssueLinkTypes defined from schema: | ||
// { | ||
// "title": "issueLinkTypes", | ||
// "type": "array", | ||
// "items": { | ||
// "title": "Issue Link Type", | ||
// "type": "object", | ||
// "properties": { | ||
// "id": { | ||
// "title": "id", | ||
// "type": "string" | ||
// }, | ||
// "inward": { | ||
// "title": "inward", | ||
// "type": "string" | ||
// }, | ||
// "name": { | ||
// "title": "name", | ||
// "type": "string" | ||
// }, | ||
// "outward": { | ||
// "title": "outward", | ||
// "type": "string" | ||
// }, | ||
// "self": { | ||
// "title": "self", | ||
// "type": "string" | ||
// } | ||
// } | ||
// } | ||
// } | ||
type IssueLinkTypes []*IssueLinkType |