set JIRA_OPERATION when parsing configs. Use figtree config types for options to make defaulting work

This commit is contained in:
Cory Bennett
2017-08-24 16:57:21 -07:00
parent 5d6170a81a
commit 5716a7cb59
31 changed files with 140 additions and 95 deletions
+1 -4
View File
@@ -15,9 +15,6 @@ type IssueLinkOptions struct {
func (jc *JiraCli) CmdIssueLinkRegistry() *CommandRegistryEntry {
opts := IssueLinkOptions{
GlobalOptions: GlobalOptions{
Template: "edit",
},
LinkIssueRequest: jiradata.LinkIssueRequest{
Type: &jiradata.IssueLinkType{},
InwardIssue: &jiradata.IssueRef{},
@@ -64,7 +61,7 @@ func (jc *JiraCli) CmdIssueLink(opts *IssueLinkOptions) error {
fmt.Printf("OK %s %s/browse/%s\n", opts.InwardIssue.Key, jc.Endpoint, opts.InwardIssue.Key)
fmt.Printf("OK %s %s/browse/%s\n", opts.OutwardIssue.Key, jc.Endpoint, opts.OutwardIssue.Key)
if opts.Browse {
if opts.Browse.Value {
if err := jc.CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.OutwardIssue.Key}); err != nil {
return jc.CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.InwardIssue.Key})
}