From 846425fe5e834a394d4e8f5d3f660e07f8264f09 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 1 May 2020 14:16:49 -0700 Subject: [PATCH] simplified boolean comparison --- command/pr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/pr.go b/command/pr.go index 8e3bba4e3..2d4b63d61 100644 --- a/command/pr.go +++ b/command/pr.go @@ -392,11 +392,11 @@ func prReopen(cmd *cobra.Command, args []string) error { } if pr.State == "MERGED" { - fmt.Fprintf(colorableErr(cmd), "%s Pull request #%d can't be reopened because it was merged.", utils.Red("!"), pr.Number) + fmt.Fprintf(colorableErr(cmd), "%s Pull request #%d can't be reopened because it was already merged.\n", utils.Red("!"), pr.Number) return nil } - if pr.Closed == false { + if !pr.Closed { fmt.Fprintf(colorableErr(cmd), "%s Pull request #%d is already open\n", utils.Yellow("!"), pr.Number) return nil }