mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 04:33:28 +02:00
refactor to allow for --insecure and --unixproxy arguments
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ type AssignOptions struct {
|
||||
Assignee string `yaml:"assignee,omitempty" json:"assignee,omitempty"`
|
||||
}
|
||||
|
||||
func CmdAssignRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdAssignRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := AssignOptions{}
|
||||
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
@@ -25,7 +25,7 @@ func CmdAssignRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdAssignUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdAssign(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ type BlockOptions struct {
|
||||
jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"`
|
||||
}
|
||||
|
||||
func CmdBlockRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdBlockRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := BlockOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("edit"),
|
||||
@@ -37,7 +37,7 @@ func CmdBlockRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdBlockUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdBlock(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coryb/figtree"
|
||||
"github.com/coryb/oreo"
|
||||
"github.com/pkg/browser"
|
||||
"gopkg.in/Netflix-Skunkworks/go-jira.v1/jiracli"
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
@@ -18,7 +19,7 @@ func CmdBrowseRegistry() *jiracli.CommandRegistryEntry {
|
||||
cmd.Arg("ISSUE", "Issue to browse to").Required().StringVar(&issue)
|
||||
return nil
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdBrowse(globals, issue)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ type CommentOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdCommentRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdCommentRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := CommentOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("comment"),
|
||||
@@ -32,7 +32,7 @@ func CmdCommentRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdCommentUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdComment(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type ComponentAddOptions struct {
|
||||
jiradata.Component `yaml:",inline" json:",inline" figtree:",inline"`
|
||||
}
|
||||
|
||||
func CmdComponentAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdComponentAddRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := ComponentAddOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("component-add"),
|
||||
@@ -30,7 +30,7 @@ func CmdComponentAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdComponentAddUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdComponentAdd(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ type ComponentsOptions struct {
|
||||
Project string `yaml:"project,omitempty" json:"project,omitempty"`
|
||||
}
|
||||
|
||||
func CmdComponentsRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdComponentsRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := ComponentsOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("components"),
|
||||
@@ -29,7 +29,7 @@ func CmdComponentsRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdComponentsUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdComponents(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ type CreateOptions struct {
|
||||
SaveFile string `yaml:"savefile,omitempty" json:"savefile,omitempty"`
|
||||
}
|
||||
|
||||
func CmdCreateRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdCreateRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := CreateOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("create"),
|
||||
@@ -37,7 +37,7 @@ func CmdCreateRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdCreateUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdCreate(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type CreateMetaOptions struct {
|
||||
IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"`
|
||||
}
|
||||
|
||||
func CmdCreateMetaRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdCreateMetaRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := CreateMetaOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("createmeta"),
|
||||
@@ -27,7 +27,7 @@ func CmdCreateMetaRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdCreateMetaUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdCreateMeta(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ type DupOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdDupRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdDupRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := DupOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("edit"),
|
||||
@@ -39,7 +39,7 @@ func CmdDupRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdDupUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdDup(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ type EditOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdEditRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdEditRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := EditOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("edit"),
|
||||
@@ -34,7 +34,7 @@ func CmdEditRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdEditUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdEdit(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ type EditMetaOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdEditMetaRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdEditMetaRegistry() *jiracli.CommandRegistryEntry {
|
||||
|
||||
opts := EditMetaOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
@@ -27,7 +27,7 @@ func CmdEditMetaRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdEditMetaUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdEditMeta(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/coryb/figtree"
|
||||
"github.com/coryb/oreo"
|
||||
"gopkg.in/Netflix-Skunkworks/go-jira.v1/jiracli"
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
@@ -27,7 +28,7 @@ func CmdExportTemplatesRegistry() *jiracli.CommandRegistryEntry {
|
||||
}
|
||||
return CmdExportTemplatesUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdExportTemplates(&opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdFieldsRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdFieldsRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("fields"),
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func CmdFieldsRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.TemplateUsage(cmd, &opts)
|
||||
return nil
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdFields(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type IssueLinkOptions struct {
|
||||
LinkType string `yaml:"linktype,omitempty" json:"linktype,omitempty"`
|
||||
}
|
||||
|
||||
func CmdIssueLinkRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdIssueLinkRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := IssueLinkOptions{
|
||||
LinkIssueRequest: jiradata.LinkIssueRequest{
|
||||
Type: &jiradata.IssueLinkType{},
|
||||
@@ -32,7 +32,7 @@ func CmdIssueLinkRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdIssueLinkUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdIssueLink(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdIssueLinkTypesRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdIssueLinkTypesRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("issuelinktypes"),
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func CmdIssueLinkTypesRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdIssueLinkTypesUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdIssueLinkTypes(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ type IssueTypesOptions struct {
|
||||
Project string `yaml:"project,omitempty" json:"project,omitempty"`
|
||||
}
|
||||
|
||||
func CmdIssueTypesRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdIssueTypesRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := IssueTypesOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("issuetypes"),
|
||||
@@ -29,7 +29,7 @@ func CmdIssueTypesRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdIssueTypesUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdIssueTypes(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type LabelsAddOptions struct {
|
||||
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
func CmdLabelsAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdLabelsAddRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := LabelsAddOptions{}
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
"Add labels to an issue",
|
||||
@@ -26,7 +26,7 @@ func CmdLabelsAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdLabelsAddUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdLabelsAdd(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type LabelsRemoveOptions struct {
|
||||
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
func CmdLabelsRemoveRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdLabelsRemoveRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := LabelsRemoveOptions{}
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
"Remove labels from an issue",
|
||||
@@ -26,7 +26,7 @@ func CmdLabelsRemoveRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdLabelsRemoveUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdLabelsRemove(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type LabelsSetOptions struct {
|
||||
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
func CmdLabelsSetRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdLabelsSetRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := LabelsSetOptions{}
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
"Set labels on an issue",
|
||||
@@ -26,7 +26,7 @@ func CmdLabelsSetRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdLabelsSetUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdLabelsSet(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ type ListOptions struct {
|
||||
jira.SearchOptions `yaml:",inline" json:",inline" figtree:",inline"`
|
||||
}
|
||||
|
||||
func CmdListRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdListRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := ListOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("list"),
|
||||
@@ -35,7 +35,7 @@ func CmdListRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
}
|
||||
return CmdListUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdList(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdLoginRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdLoginRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := jiracli.CommonOptions{}
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
"Attempt to login into jira server",
|
||||
@@ -20,7 +20,7 @@ func CmdLoginRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return nil
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdLogin(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdLogoutRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdLogoutRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := jiracli.CommonOptions{}
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
"Deactivate sesssion with Jira server",
|
||||
@@ -19,7 +19,7 @@ func CmdLogoutRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return nil
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdLogout(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ type RankOptions struct {
|
||||
Order string `yaml:"order,omitempty" json:"order,omitempty"`
|
||||
}
|
||||
|
||||
func CmdRankRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdRankRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := RankOptions{}
|
||||
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
@@ -28,7 +28,7 @@ func CmdRankRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdRankUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdRank(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ type RequestOptions struct {
|
||||
Data string `yaml:"data,omitempty" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func CmdRequestRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdRequestRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := RequestOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("request"),
|
||||
@@ -37,7 +37,7 @@ func CmdRequestRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
}
|
||||
return CmdRequestUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdRequest(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ type SubtaskOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdSubtaskRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdSubtaskRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := SubtaskOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("subtask"),
|
||||
@@ -38,7 +38,7 @@ func CmdSubtaskRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
}
|
||||
return CmdSubtaskUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdSubtask(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdTakeRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdTakeRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := AssignOptions{}
|
||||
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
@@ -16,7 +16,7 @@ func CmdTakeRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdAssignUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
opts.Assignee = globals.User.Value
|
||||
return CmdAssign(o, globals, &opts)
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ type TransitionOptions struct {
|
||||
Resolution string `yaml:"resolution,omitempty" json:"resolution,omitempty"`
|
||||
}
|
||||
|
||||
func CmdTransitionRegistry(o *oreo.Client, transition string) *jiracli.CommandRegistryEntry {
|
||||
func CmdTransitionRegistry(transition string) *jiracli.CommandRegistryEntry {
|
||||
opts := TransitionOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("transition"),
|
||||
@@ -44,7 +44,7 @@ func CmdTransitionRegistry(o *oreo.Client, transition string) *jiracli.CommandRe
|
||||
}
|
||||
return CmdTransitionUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdTransition(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type TransitionsOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdTransitionsRegistry(o *oreo.Client, defaultTemplate string) *jiracli.CommandRegistryEntry {
|
||||
func CmdTransitionsRegistry(defaultTemplate string) *jiracli.CommandRegistryEntry {
|
||||
opts := TransitionsOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption(defaultTemplate),
|
||||
@@ -26,7 +26,7 @@ func CmdTransitionsRegistry(o *oreo.Client, defaultTemplate string) *jiracli.Com
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdTransitionsUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdTransitions(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import (
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func CmdUnassignRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdUnassignRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := AssignOptions{}
|
||||
|
||||
return &jiracli.CommandRegistryEntry{
|
||||
@@ -16,7 +16,7 @@ func CmdUnassignRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdAssignUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdAssign(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/coryb/figtree"
|
||||
"github.com/coryb/oreo"
|
||||
"gopkg.in/Netflix-Skunkworks/go-jira.v1/jiracli"
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
@@ -25,7 +26,7 @@ func CmdUnexportTemplatesRegistry() *jiracli.CommandRegistryEntry {
|
||||
|
||||
return CmdExportTemplatesUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdUnexportTemplates(&opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ type ViewOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdViewRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdViewRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := ViewOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("view"),
|
||||
@@ -27,7 +27,7 @@ func CmdViewRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdViewUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdView(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ type VoteOptions struct {
|
||||
Action VoteAction `yaml:"-" json:"-"`
|
||||
}
|
||||
|
||||
func CmdVoteRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdVoteRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := VoteOptions{
|
||||
CommonOptions: jiracli.CommonOptions{},
|
||||
Action: VoteUP,
|
||||
@@ -36,7 +36,7 @@ func CmdVoteRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdVoteUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdVote(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ type WatchOptions struct {
|
||||
Action WatchAction `yaml:"-" json:"-"`
|
||||
}
|
||||
|
||||
func CmdWatchRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdWatchRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := WatchOptions{
|
||||
CommonOptions: jiracli.CommonOptions{},
|
||||
Action: WatcherAdd,
|
||||
@@ -37,7 +37,7 @@ func CmdWatchRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdWatchUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdWatch(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type WorklogAddOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdWorklogAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdWorklogAddRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := WorklogAddOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("worklog"),
|
||||
@@ -29,7 +29,7 @@ func CmdWorklogAddRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdWorklogAddUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdWorklogAdd(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type WorklogListOptions struct {
|
||||
Issue string `yaml:"issue,omitempty" json:"issue,omitempty"`
|
||||
}
|
||||
|
||||
func CmdWorklogListRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
func CmdWorklogListRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts := WorklogListOptions{
|
||||
CommonOptions: jiracli.CommonOptions{
|
||||
Template: figtree.NewStringOption("worklogs"),
|
||||
@@ -26,7 +26,7 @@ func CmdWorklogListRegistry(o *oreo.Client) *jiracli.CommandRegistryEntry {
|
||||
jiracli.LoadConfigs(cmd, fig, &opts)
|
||||
return CmdWorklogListUsage(cmd, &opts)
|
||||
},
|
||||
func(globals *jiracli.GlobalOptions) error {
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
return CmdWorklogList(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user