mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-27 08:18:29 +02:00
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:
+1
-1
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user