Skip to content

Commit 5415e47

Browse files
committed
fix
1 parent 29f2c57 commit 5415e47

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tools/flakeguard/cmd/create_jira_tickets.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,6 @@ ticket in a text-based UI. Press 'y' to confirm creation, 'n' to skip,
207207
fmt.Printf("Local DB has been updated at: %s\n", fm.LocalDB.FilePath())
208208
}
209209

210-
// 10) Write remaining CSV
211-
remainingCSVPath := makeRemainingCSVPath(csvPath)
212-
if err := writeRemainingTicketsCSV(remainingCSVPath, fm); err != nil {
213-
log.Error().Err(err).Msgf("Failed to write updated CSV to %s", remainingCSVPath)
214-
} else {
215-
fmt.Printf("Remaining tickets have been written to: %s\n", remainingCSVPath)
216-
}
217-
218210
return nil
219211
},
220212
}
@@ -532,6 +524,16 @@ func (m model) View() string {
532524
return finalView(m)
533525
}
534526

527+
if m.mode == "ticketCreated" {
528+
domain := os.Getenv("JIRA_DOMAIN")
529+
ticketURL := m.tickets[m.index].ExistingJiraKey
530+
if domain != "" {
531+
ticketURL = fmt.Sprintf("https://%s/browse/%s", domain, m.tickets[m.index].ExistingJiraKey)
532+
}
533+
ticketStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("11")).Align(lipgloss.Left)
534+
return ticketStyle.Render("Ticket created:") + ticketURL + "\n\nPress any key to continue..."
535+
}
536+
535537
if m.mode == "promptExisting" {
536538
return fmt.Sprintf(
537539
"Enter existing Jira ticket ID for test %q:\n\n%s\n\n(Press Enter to confirm, Esc to cancel)",
@@ -561,7 +563,7 @@ func (m model) View() string {
561563
// New: Assignee line above Summary
562564
var assigneeLine string
563565
if t.Assignee != "" {
564-
assigneeLine = summaryStyle.Render(fmt.Sprintf("Assignee: %s", t.Assignee))
566+
assigneeLine = summaryStyle.Render("Assignee:") + "\n" + t.Assignee
565567
}
566568

567569
sum := summaryStyle.Render("Summary:")

0 commit comments

Comments
 (0)