From 3574240fa798209f3dcb41401245ee72946eaad0 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Sun, 22 May 2022 23:38:50 -0700 Subject: [PATCH] Always clear screen when watching PR checks (#5678) --- pkg/cmd/pr/checks/checks.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/pr/checks/checks.go b/pkg/cmd/pr/checks/checks.go index f9ae516c9..3431ae33b 100644 --- a/pkg/cmd/pr/checks/checks.go +++ b/pkg/cmd/pr/checks/checks.go @@ -146,10 +146,12 @@ func checksRun(opts *ChecksOptions) error { return err } - if counts.Pending != 0 && opts.Watch { + if opts.Watch { refreshScreen(opts.IO.Out) - cs := opts.IO.ColorScheme() - fmt.Fprintln(opts.IO.Out, cs.Boldf("Refreshing checks status every %v seconds. Press Ctrl+C to quit.\n", opts.Interval.Seconds())) + if counts.Pending != 0 { + cs := opts.IO.ColorScheme() + fmt.Fprintln(opts.IO.Out, cs.Boldf("Refreshing checks status every %v seconds. Press Ctrl+C to quit.\n", opts.Interval.Seconds())) + } } printSummary(opts.IO, counts)