Skip to content

Commit

Permalink
Pass pr by value to preview function
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnstn committed Oct 17, 2023
1 parent bc68e6b commit dcebf9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/pkg/gh/gh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/release/gb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/release/gbm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dcebf9a

Please sign in to comment.