Skip to content

Commit bcef053

Browse files
ostermanclaude
andcommitted
fix: Update ui.* calls to match new void-return API
Main branch merged #1980 which removed error returns from ui.* functions. Updated cmd/ci/status.go and cmd/terraform/planfile/*.go to match the new API that doesn't return values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 95bbde3 commit bcef053

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

cmd/ci/status.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func fillMissingSHA(ctx *repoContext) {
212212

213213
// renderStatus renders the CI status to the terminal.
214214
func renderStatus(status *ci.Status) {
215-
_ = ui.Writef("Relevant pull requests in %s\n\n", status.Repository)
215+
ui.Writef("Relevant pull requests in %s\n\n", status.Repository)
216216

217217
// Current branch.
218218
if status.CurrentBranch != nil {
@@ -221,15 +221,15 @@ func renderStatus(status *ci.Status) {
221221

222222
// PRs created by user.
223223
if len(status.CreatedByUser) > 0 {
224-
_ = ui.Writeln("\nCreated by you")
224+
ui.Writeln("\nCreated by you")
225225
for _, pr := range status.CreatedByUser {
226226
renderPRStatus(pr)
227227
}
228228
}
229229

230230
// PRs requesting review.
231231
if len(status.ReviewRequests) > 0 {
232-
_ = ui.Writeln("\nRequesting a code review from you")
232+
ui.Writeln("\nRequesting a code review from you")
233233
for _, pr := range status.ReviewRequests {
234234
renderPRStatus(pr)
235235
}
@@ -238,23 +238,23 @@ func renderStatus(status *ci.Status) {
238238

239239
// renderBranchStatus renders status for a branch.
240240
func renderBranchStatus(bs *ci.BranchStatus) {
241-
_ = ui.Writeln("Current branch")
241+
ui.Writeln("Current branch")
242242

243243
if bs.PullRequest != nil {
244244
renderPRStatus(bs.PullRequest)
245245
} else {
246-
_ = ui.Writef(" Commit status for %s\n", truncateSHA(bs.CommitSHA))
246+
ui.Writef(" Commit status for %s\n", truncateSHA(bs.CommitSHA))
247247
renderChecks(bs.Checks, " ")
248-
_ = ui.Writeln("\n No open pull request for current branch.")
248+
ui.Writeln("\n No open pull request for current branch.")
249249
}
250250
}
251251

252252
// renderPRStatus renders status for a pull request.
253253
func renderPRStatus(pr *ci.PRStatus) {
254-
_ = ui.Writef(" #%d %s [%s]\n", pr.Number, pr.Title, pr.Branch)
254+
ui.Writef(" #%d %s [%s]\n", pr.Number, pr.Title, pr.Branch)
255255

256256
if pr.AllPassed && len(pr.Checks) > 0 {
257-
_ = ui.Writeln(" - All checks passing")
257+
ui.Writeln(" - All checks passing")
258258
} else {
259259
renderChecks(pr.Checks, " ")
260260
}
@@ -264,7 +264,7 @@ func renderPRStatus(pr *ci.PRStatus) {
264264
func renderChecks(checks []*ci.CheckStatus, indent string) {
265265
for _, check := range checks {
266266
icon := getCheckIcon(check.CheckState())
267-
_ = ui.Writef("%s- %s %s (%s)\n", indent, icon, check.Name, check.Conclusion)
267+
ui.Writef("%s- %s %s (%s)\n", indent, icon, check.Name, check.Conclusion)
268268
}
269269
}
270270

cmd/terraform/planfile/delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func runDelete(cmd *cobra.Command, args []string) error {
8989
return err
9090
}
9191
if !exists {
92-
_ = ui.Warning(fmt.Sprintf("Planfile does not exist: %s", opts.Key))
92+
ui.Warning(fmt.Sprintf("Planfile does not exist: %s", opts.Key))
9393
return nil
9494
}
9595

@@ -106,7 +106,7 @@ func runDelete(cmd *cobra.Command, args []string) error {
106106
return err
107107
}
108108

109-
_ = ui.Success(fmt.Sprintf("Deleted planfile from %s: %s", store.Name(), opts.Key))
109+
ui.Success(fmt.Sprintf("Deleted planfile from %s: %s", store.Name(), opts.Key))
110110
return nil
111111
}
112112

cmd/terraform/planfile/download.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ func writeToFile(outputPath string, reader io.Reader) error {
158158

159159
// printDownloadSuccess prints the success message for a download.
160160
func printDownloadSuccess(storeName, key, outputPath string, metadata *planfile.Metadata) {
161-
_ = ui.Success(fmt.Sprintf("Downloaded planfile from %s: %s -> %s", storeName, key, outputPath))
161+
ui.Success(fmt.Sprintf("Downloaded planfile from %s: %s -> %s", storeName, key, outputPath))
162162
if metadata != nil && metadata.Stack != "" {
163-
_ = ui.Info(fmt.Sprintf("Stack: %s, Component: %s, SHA: %s", metadata.Stack, metadata.Component, metadata.SHA))
163+
ui.Info(fmt.Sprintf("Stack: %s, Component: %s, SHA: %s", metadata.Stack, metadata.Component, metadata.SHA))
164164
}
165165
}
166166

cmd/terraform/planfile/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func runUpload(cmd *cobra.Command, args []string) error {
130130
return err
131131
}
132132

133-
_ = ui.Success(fmt.Sprintf("Uploaded planfile to %s: %s", store.Name(), key))
133+
ui.Success(fmt.Sprintf("Uploaded planfile to %s: %s", store.Name(), key))
134134
return nil
135135
}
136136

0 commit comments

Comments
 (0)