Skip to content

Commit

Permalink
Prefer transition names which match exactly
Browse files Browse the repository at this point in the history
Some transitions are substrings of other transitions, and the current
loop sometimes never chose the correct one. For example, it would never
choose "QA" if there were also a transtion "Deploy to QA". Ditto for
"Open" and "Reopen".
  • Loading branch information
dbrower committed Aug 24, 2016
1 parent 693b3e4 commit e40f9c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ func (c *Cli) CmdTransition(issue string, trans string) error {
transName = name
transID = id
transMeta = transition.(map[string]interface{})
if strings.ToLower(name) == strings.ToLower(trans) {
break
}
}
}
if transID == "" {
Expand Down

0 comments on commit e40f9c1

Please sign in to comment.