Skip to content

Commit d1f79af

Browse files
committed
small fixes
1 parent 5016861 commit d1f79af

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

tools/flakeguard/cmd/create_jira_tickets.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,9 @@ func (m tmodel) View() string {
653653
var helpLine string
654654
if !t.Valid {
655655
if t.ExistingJiraKey != "" {
656-
helpLine = faintStyle.Render("\n[n] to next, [e] to update ticket id, [q] to quit.")
656+
helpLine = faintStyle.Render("\n[n] to next, [e] to SET existing ticket id, [q] to quit.")
657657
} else {
658-
helpLine = faintStyle.Render("\n[n] to next, [e] to add existing ticket ID, [q] to quit.")
658+
helpLine = faintStyle.Render("\n[n] to next, [e] to SET existing ticket id, [q] to quit.")
659659
}
660660
} else {
661661
if t.ExistingJiraKey != "" {
@@ -666,7 +666,7 @@ func (m tmodel) View() string {
666666
if m.DryRun || m.JiraClient == nil {
667667
dryRunLabel = " (DRY RUN)"
668668
}
669-
helpLine = faintStyle.Render(fmt.Sprintf("\nPress [c] to create ticket%s, [n] to skip, [e] to enter existing ticket, [q] to quit.", dryRunLabel))
669+
helpLine = faintStyle.Render(fmt.Sprintf("\nPress [c] to create NEW ticket%s, [n] to skip, [e] to SET existing ticket id, [q] to quit.", dryRunLabel))
670670
}
671671
}
672672

tools/flakeguard/jirautils/jira.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,11 @@ func CreateTicketInJira(
8282
} else {
8383
log.Debug().Msg("No priority name provided, skipping priority setting.")
8484
}
85-
// --- End Priority Setting ---
8685

87-
// --- Create the Issue ---
86+
// Create the issue
8887
issue := &jira.Issue{
8988
Fields: fields,
9089
}
91-
92-
log.Debug().Interface("issue_payload", issue).Msg("Attempting to create Jira issue") // Log payload for debugging
93-
9490
newIssue, resp, err := client.Issue.CreateWithContext(context.Background(), issue)
9591
if err != nil {
9692
// Read response body for more detailed error context
@@ -100,7 +96,6 @@ func CreateTicketInJira(
10096
return "", fmt.Errorf("error creating Jira issue (status: %s): %w; response: %s", getResponseStatus(resp), err, errMsg)
10197
}
10298

103-
log.Info().Str("issue_key", newIssue.Key).Msg("Successfully created Jira issue")
10499
return newIssue.Key, nil
105100
}
106101

0 commit comments

Comments
 (0)