diff --git a/pkg/cmd/pr/checkout/checkout.go b/pkg/cmd/pr/checkout/checkout.go index 8fb591b58..adaa6abe6 100644 --- a/pkg/cmd/pr/checkout/checkout.go +++ b/pkg/cmd/pr/checkout/checkout.go @@ -340,7 +340,7 @@ func resolvePR(httpClient *http.Client, baseRepo ghrepo.Interface, prompter shar func promptForPR(prompter shared.Prompter, cs *iostreams.ColorScheme, jobs api.PullRequestAndTotalCount) (*api.PullRequest, error) { candidates := []string{} for _, pr := range jobs.PullRequests { - candidates = append(candidates, text.Truncate(120, fmt.Sprintf("%s %s (%s)", + candidates = append(candidates, text.Truncate(120, fmt.Sprintf("%s %s [%s]", shared.PRNumberWithColor(cs, pr), text.RemoveExcessiveWhitespace(pr.Title), cs.Gray(pr.HeadLabel()), diff --git a/pkg/cmd/pr/checkout/checkout_test.go b/pkg/cmd/pr/checkout/checkout_test.go index 4bbf23cdb..33173252e 100644 --- a/pkg/cmd/pr/checkout/checkout_test.go +++ b/pkg/cmd/pr/checkout/checkout_test.go @@ -239,9 +239,9 @@ func Test_checkoutRun(t *testing.T) { }, promptStubs: func(pm *prompter.MockPrompter) { pm.RegisterSelect("Select a pull request", - []string{"#32 New feature (feature)", "#29 Fixed bad bug (bug-fix)", "#28 Improve documentation (docs)"}, + []string{"#32 New feature [feature]", "#29 Fixed bad bug [bug-fix]", "#28 Improve documentation [docs]"}, func(_, _ string, opts []string) (int, error) { - return prompter.IndexFor(opts, "#32 New feature (feature)") + return prompter.IndexFor(opts, "#32 New feature [feature]") }) }, runStubs: func(cs *run.CommandStubber) {