Tweak CmdLabels args so that magic happens with CLI

The CLI looks for commands (like 'labels') in the first two positional args. This
is how commands like 'BLOCKER blocks ISSUE' work.

As per @coryb's comments in #21 - this allows us to support set/add/remove in a
consistent way for other types: components for example.

This commit rearranges the command to be as follows:

    jira (set/add/remove) labels ISSUE LABELS...

The options to CmdLabels have been reordered accordingly.
This commit is contained in:
Mike Pountney
2016-01-03 20:10:12 -08:00
parent 4f988b42f8
commit 40a7c65366
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -542,7 +542,7 @@ func (c *Cli) CmdComment(issue string) error {
return nil
}
func (c *Cli) CmdLabels(issue string, command string, labels []string) error {
func (c *Cli) CmdLabels(command string, issue string, labels []string) error {
log.Debug("label called")
if command != "add" && command != "remove" && command != "set" {