From dcebf9a3b60d399879b84e24fd321f6ccca7118d Mon Sep 17 00:00:00 2001 From: jhnstn Date: Tue, 17 Oct 2023 16:36:48 -0400 Subject: [PATCH] Pass pr by value to preview function --- cli/pkg/gh/gh.go | 2 +- cli/pkg/release/gb.go | 2 +- cli/pkg/release/gbm.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/pkg/gh/gh.go b/cli/pkg/gh/gh.go index e9896c16..64db32a6 100644 --- a/cli/pkg/gh/gh.go +++ b/cli/pkg/gh/gh.go @@ -181,7 +181,7 @@ func labelRequest(rpo string, prNum int, labels []string) ([]Label, error) { return resp, nil } -func PreviewPr(rpo, dir string, pr *PullRequest) { +func PreviewPr(rpo, dir string, pr PullRequest) { org, _ := repo.GetOrg(rpo) cyan := color.New(color.FgCyan, color.Bold).SprintfFunc() console.Log(cyan("\nPr Preview")) diff --git a/cli/pkg/release/gb.go b/cli/pkg/release/gb.go index 7be30765..3dde8101 100644 --- a/cli/pkg/release/gb.go +++ b/cli/pkg/release/gb.go @@ -112,7 +112,7 @@ func CreateGbPR(version, dir string) (gh.PullRequest, error) { Name: "Mobile App - i.e. Android or iOS", }} - gh.PreviewPr("gutenberg", dir, &pr) + gh.PreviewPr("gutenberg", dir, pr) prompt := fmt.Sprintf("\nReady to create the PR on %s/gutenberg?", org) cont := console.Confirm(prompt) diff --git a/cli/pkg/release/gbm.go b/cli/pkg/release/gbm.go index 1c28bad2..3c4301f6 100644 --- a/cli/pkg/release/gbm.go +++ b/cli/pkg/release/gbm.go @@ -171,7 +171,7 @@ func CreateGbmPR(version, dir string) (gh.PullRequest, error) { }} // Display PR preview - gh.PreviewPr("gutenberg-mobile", dir, &pr) + gh.PreviewPr("gutenberg-mobile", dir, pr) // Add prompt to confirm PR creation prompt := fmt.Sprintf("\nReady to create the PR on %s/gutenberg-mobile?", org)