set yaml/json tags for option structs

This commit is contained in:
Cory Bennett
2017-08-27 20:46:25 -07:00
parent c89f11d5b5
commit f52d2c472a
30 changed files with 116 additions and 122 deletions
+3 -3
View File
@@ -11,9 +11,9 @@ import (
) )
type AssignOptions struct { type AssignOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Assignee string Assignee string `yaml:"assignee,omitempty" json:"assignee,omitempty"`
} }
func CmdAssignRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdAssignRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+4 -4
View File
@@ -12,10 +12,10 @@ import (
) )
type BlockOptions struct { type BlockOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.LinkIssueRequest `yaml:",inline" figtree:",inline"` jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"`
Blocker string Blocker string `yaml:"blocker,omitempty" json:"blocker,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdBlockRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdBlockRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -9,8 +9,8 @@ import (
) )
type BrowseOptions struct { type BrowseOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdBrowseRegistry(fig *figtree.FigTree) *CommandRegistryEntry { func CmdBrowseRegistry(fig *figtree.FigTree) *CommandRegistryEntry {
-17
View File
@@ -21,12 +21,6 @@ import (
var log = logging.MustGetLogger("jira") var log = logging.MustGetLogger("jira")
// type JiraCli struct {
// jira.Jira `yaml:",inline"`
// ConfigDir string
// oreoAgent *oreo.Client
// }
type Exit struct { type Exit struct {
Code int Code int
} }
@@ -60,17 +54,6 @@ type kingpinAppOrCommand interface {
GetCommand(string) *kingpin.CmdClause GetCommand(string) *kingpin.CmdClause
} }
// func New(configDir string) *JiraCli {
// agent := oreo.New().WithCookieFile(filepath.Join(homedir(), configDir, "cookies.js"))
// return &JiraCli{
// ConfigDir: configDir,
// Jira: jira.Jira{
// UA: agent,
// },
// oreoAgent: agent,
// }
// }
func Register(app *kingpin.Application, reg []CommandRegistry) { func Register(app *kingpin.Application, reg []CommandRegistry) {
for _, command := range reg { for _, command := range reg {
copy := command copy := command
+3 -3
View File
@@ -12,9 +12,9 @@ import (
) )
type CommentOptions struct { type CommentOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Overrides map[string]string Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdCommentRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdCommentRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -12,8 +12,8 @@ import (
) )
type ComponentAddOptions struct { type ComponentAddOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.Component `yaml:",inline" figtree:",inline"` jiradata.Component `yaml:",inline" json:",inline" figtree:",inline"`
} }
func CmdComponentAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdComponentAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -11,8 +11,8 @@ import (
) )
type ComponentsOptions struct { type ComponentsOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Project string Project string `yaml:"project,omitempty" json:"project,omitempty"`
} }
func CmdComponentsRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdComponentsRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+5 -5
View File
@@ -12,11 +12,11 @@ import (
) )
type CreateOptions struct { type CreateOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.IssueUpdate `yaml:",inline" figtree:",inline"` jiradata.IssueUpdate `yaml:",inline" json:",inline" figtree:",inline"`
Project string Project string `yaml:"project,omitempty" json:"project,omitempty"`
IssueType string IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"`
Overrides map[string]string Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
} }
func CmdCreateRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdCreateRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
) )
type CreateMetaOptions struct { type CreateMetaOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Project string `yaml:"project,omitempty" json:"project,omitempty"` Project string `yaml:"project,omitempty" json:"project,omitempty"`
IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"` IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"`
} }
+4 -4
View File
@@ -12,10 +12,10 @@ import (
) )
type DupOptions struct { type DupOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.LinkIssueRequest `yaml:",inline" figtree:",inline"` jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"`
Duplicate string Duplicate string `yaml:"duplicate,omitempty" json:"duplicate,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdDupRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdDupRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+5 -5
View File
@@ -12,11 +12,11 @@ import (
) )
type EditOptions struct { type EditOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.IssueUpdate `yaml:",inline" figtree:",inline"` jiradata.IssueUpdate `yaml:",inline" json:",inline" figtree:",inline"`
jira.SearchOptions `yaml:",inline" figtree:",inline"` jira.SearchOptions `yaml:",inline" json:",inline" figtree:",inline"`
Overrides map[string]string Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdEditRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdEditRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -8,8 +8,8 @@ import (
) )
type EditMetaOptions struct { type EditMetaOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdEditMetaRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdEditMetaRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+6 -5
View File
@@ -11,14 +11,12 @@ import (
) )
type ExportTemplatesOptions struct { type ExportTemplatesOptions struct {
Template string Template string `yaml:"template,omitempty" json:"template,omitempty"`
Dir string Dir string `yaml:"dir,omitempty" json:"dir,omitempty"`
} }
func CmdExportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry { func CmdExportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry {
opts := ExportTemplatesOptions{ opts := ExportTemplatesOptions{}
Dir: fmt.Sprintf("%s/.jira.d/templates", Homedir()),
}
return &CommandRegistryEntry{ return &CommandRegistryEntry{
"Export templates for customizations", "Export templates for customizations",
@@ -27,6 +25,9 @@ func CmdExportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry {
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.Dir == "" {
opts.Dir = fmt.Sprintf("%s/.jira.d/templates", Homedir())
}
return CmdExportTemplatesUsage(cmd, &opts) return CmdExportTemplatesUsage(cmd, &opts)
}, },
} }
+3 -3
View File
@@ -12,9 +12,9 @@ import (
) )
type IssueLinkOptions struct { type IssueLinkOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.LinkIssueRequest `yaml:",inline" figtree:",inline"` jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"`
LinkType string LinkType string `yaml:"linktype,omitempty" json:"linktype,omitempty"`
} }
func CmdIssueLinkRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdIssueLinkRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -11,8 +11,8 @@ import (
) )
type IssueTypesOptions struct { type IssueTypesOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Project string Project string `yaml:"project,omitempty" json:"project,omitempty"`
} }
func CmdIssueTypesRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdIssueTypesRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+3 -3
View File
@@ -12,9 +12,9 @@ import (
) )
type LabelsAddOptions struct { type LabelsAddOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Labels []string Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
} }
func CmdLabelsAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdLabelsAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+3 -3
View File
@@ -12,9 +12,9 @@ import (
) )
type LabelsRemoveOptions struct { type LabelsRemoveOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Labels []string Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
} }
func CmdLabelsRemoveRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdLabelsRemoveRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+3 -3
View File
@@ -12,9 +12,9 @@ import (
) )
type LabelsSetOptions struct { type LabelsSetOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Labels []string Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
} }
func CmdLabelsSetRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdLabelsSetRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+11 -7
View File
@@ -8,8 +8,8 @@ import (
) )
type ListOptions struct { type ListOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jira.SearchOptions `yaml:",inline" figtree:",inline"` jira.SearchOptions `yaml:",inline" json:",inline" figtree:",inline"`
} }
func CmdListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
@@ -17,11 +17,6 @@ func CmdListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry
GlobalOptions: GlobalOptions{ GlobalOptions: GlobalOptions{
Template: figtree.NewStringOption("list"), Template: figtree.NewStringOption("list"),
}, },
SearchOptions: jira.SearchOptions{
MaxResults: 500,
QueryFields: "assignee,created,priority,reporter,status,summary,updated",
Sort: "priority asc, key",
},
} }
return &CommandRegistryEntry{ return &CommandRegistryEntry{
@@ -31,6 +26,15 @@ func CmdListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.MaxResults == 0 {
opts.MaxResults = 500
}
if opts.QueryFields == "" {
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated"
}
if opts.Sort == "" {
opts.Sort = "priority asc, key"
}
return CmdListUsage(cmd, &opts) return CmdListUsage(cmd, &opts)
}, },
} }
+5 -7
View File
@@ -12,16 +12,14 @@ import (
) )
type RankOptions struct { type RankOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
First string First string `yaml:"first,omitempty" json:"first,omitempty"`
Second string Second string `yaml:"second,omitempty" json:"second,omitempty"`
Order string Order string `yaml:"order,omitempty" json:"order,omitempty"`
} }
func CmdRankRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdRankRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
opts := RankOptions{ opts := RankOptions{}
GlobalOptions: GlobalOptions{},
}
return &CommandRegistryEntry{ return &CommandRegistryEntry{
"Mark issues as blocker", "Mark issues as blocker",
+7 -5
View File
@@ -14,10 +14,10 @@ import (
) )
type RequestOptions struct { type RequestOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Method string Method string `yaml:"method,omitempty" json:"method,omitempty"`
URI string URI string `yaml:"uri,omitempty" json:"uri,omitempty"`
Data string Data string `yaml:"data,omitempty" json:"data,omitempty"`
} }
func CmdRequestRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdRequestRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
@@ -25,7 +25,6 @@ func CmdRequestRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEn
GlobalOptions: GlobalOptions{ GlobalOptions: GlobalOptions{
Template: figtree.NewStringOption("request"), Template: figtree.NewStringOption("request"),
}, },
Method: "GET",
} }
return &CommandRegistryEntry{ return &CommandRegistryEntry{
@@ -35,6 +34,9 @@ func CmdRequestRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEn
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.Method == "" {
opts.Method = "GET"
}
return CmdRequestUsage(cmd, &opts) return CmdRequestUsage(cmd, &opts)
}, },
} }
+9 -7
View File
@@ -12,12 +12,12 @@ import (
) )
type SubtaskOptions struct { type SubtaskOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.IssueUpdate `yaml:",inline" figtree:",inline"` jiradata.IssueUpdate `yaml:",inline" json:",inline" figtree:",inline"`
Project string Project string `yaml:"project,omitempty" json:"project,omitempty"`
IssueType string IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"`
Overrides map[string]string Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdSubtaskRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdSubtaskRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
@@ -25,7 +25,6 @@ func CmdSubtaskRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEn
GlobalOptions: GlobalOptions{ GlobalOptions: GlobalOptions{
Template: figtree.NewStringOption("subtask"), Template: figtree.NewStringOption("subtask"),
}, },
IssueType: "Sub-task",
Overrides: map[string]string{}, Overrides: map[string]string{},
} }
@@ -36,6 +35,9 @@ func CmdSubtaskRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEn
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.IssueType == "" {
opts.IssueType = "Sub-task"
}
return CmdSubtaskUsage(cmd, &opts) return CmdSubtaskUsage(cmd, &opts)
}, },
} }
+9 -7
View File
@@ -13,11 +13,11 @@ import (
) )
type TransitionOptions struct { type TransitionOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Overrides map[string]string Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
Transition string Transition string `yaml:"transition,omitempty" json:"transition,omitempty"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Resolution string Resolution string `yaml:"resolution,omitempty" json:"resolution,omitempty"`
} }
func CmdTransitionRegistry(fig *figtree.FigTree, o *oreo.Client, transition string) *CommandRegistryEntry { func CmdTransitionRegistry(fig *figtree.FigTree, o *oreo.Client, transition string) *CommandRegistryEntry {
@@ -25,8 +25,7 @@ func CmdTransitionRegistry(fig *figtree.FigTree, o *oreo.Client, transition stri
GlobalOptions: GlobalOptions{ GlobalOptions: GlobalOptions{
Template: figtree.NewStringOption("transition"), Template: figtree.NewStringOption("transition"),
}, },
Transition: transition, Overrides: map[string]string{},
Overrides: map[string]string{},
} }
help := "Transition issue to given state" help := "Transition issue to given state"
@@ -41,6 +40,9 @@ func CmdTransitionRegistry(fig *figtree.FigTree, o *oreo.Client, transition stri
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.Transition == "" {
opts.Transition = transition
}
return CmdTransitionUsage(cmd, &opts) return CmdTransitionUsage(cmd, &opts)
}, },
} }
+2 -2
View File
@@ -8,8 +8,8 @@ import (
) )
type TransitionsOptions struct { type TransitionsOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdTransitionsRegistry(fig *figtree.FigTree, o *oreo.Client, defaultTemplate string) *CommandRegistryEntry { func CmdTransitionsRegistry(fig *figtree.FigTree, o *oreo.Client, defaultTemplate string) *CommandRegistryEntry {
+5 -3
View File
@@ -13,9 +13,7 @@ import (
) )
func CmdUnexportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry { func CmdUnexportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry {
opts := ExportTemplatesOptions{ opts := ExportTemplatesOptions{}
Dir: fmt.Sprintf("%s/.jira.d/templates", Homedir()),
}
return &CommandRegistryEntry{ return &CommandRegistryEntry{
"Remove unmodified exported templates", "Remove unmodified exported templates",
@@ -24,6 +22,10 @@ func CmdUnexportTemplatesRegistry(fig *figtree.FigTree) *CommandRegistryEntry {
}, },
func(cmd *kingpin.CmdClause) error { func(cmd *kingpin.CmdClause) error {
LoadConfigs(cmd, fig, &opts) LoadConfigs(cmd, fig, &opts)
if opts.Dir != "" {
opts.Dir = fmt.Sprintf("%s/.jira.d/templates", Homedir())
}
return CmdExportTemplatesUsage(cmd, &opts) return CmdExportTemplatesUsage(cmd, &opts)
}, },
} }
+3 -3
View File
@@ -8,9 +8,9 @@ import (
) )
type ViewOptions struct { type ViewOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jira.IssueOptions `yaml:",inline" figtree:",inline"` jira.IssueOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdViewRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdViewRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+3 -3
View File
@@ -18,9 +18,9 @@ const (
) )
type VoteOptions struct { type VoteOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Action VoteAction Action VoteAction `yaml:"-" json:"-"`
} }
func CmdVoteRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdVoteRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+4 -4
View File
@@ -18,10 +18,10 @@ const (
) )
type WatchOptions struct { type WatchOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
Watcher string Watcher string `yaml:"watcher,omitempty" json:"watcher,omitempty"`
Action WatchAction Action WatchAction `yaml:"-" json:"-"`
} }
func CmdWatchRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdWatchRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+3 -3
View File
@@ -9,9 +9,9 @@ import (
) )
type WorklogAddOptions struct { type WorklogAddOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.Worklog `yaml:",inline" figtree:",inline"` jiradata.Worklog `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdWorklogAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdWorklogAddRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {
+2 -2
View File
@@ -8,8 +8,8 @@ import (
) )
type WorklogListOptions struct { type WorklogListOptions struct {
GlobalOptions `yaml:",inline" figtree:",inline"` GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"`
Issue string Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
} }
func CmdWorklogListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { func CmdWorklogListRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry {