Skip to content

Commit 7122a6a

Browse files
committed
fix state after ticket created
1 parent 674377f commit 7122a6a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tools/flakeguard/cmd/create_jira_tickets.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -474,21 +474,20 @@ func updateConfirm(m tmodel) (tea.Model, tea.Cmd) {
474474

475475
func updateTicketCreated(m tmodel, msg tea.KeyMsg) (tea.Model, tea.Cmd) {
476476
switch msg.String() {
477-
case "n":
477+
case "e": // Still allow 'e' to go to the prompt mode
478+
m.mode = "promptExisting"
479+
m.inputValue = ""
480+
return m, nil
481+
case "q", "esc", "ctrl+c": // Still allow quitting
482+
return updateQuit(m)
483+
default: // Make continuing the default action for *any other key*
478484
m.mode = "normal"
479485
m.index++
480486
if m.index >= len(m.tickets) {
481-
m.quitting = true
487+
m.quitting = true // Ensure it quits if this was the last ticket
482488
}
483489
return m, nil
484-
case "e":
485-
m.mode = "promptExisting"
486-
m.inputValue = ""
487-
return m, nil
488-
case "q", "esc", "ctrl+c":
489-
return updateQuit(m)
490490
}
491-
return m, nil
492491
}
493492

494493
func updateSkip(m tmodel) (tea.Model, tea.Cmd) {

0 commit comments

Comments
 (0)