From 3409d068d4f85a7e1d613d97151071758a27b005 Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Thu, 11 Jan 2024 11:34:08 +0100 Subject: [PATCH] Make commit title in bold --- pkg/cmd/pr/create/create.go | 2 +- pkg/cmd/pr/create/create_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/pr/create/create.go b/pkg/cmd/pr/create/create.go index 809c83128b9..4b37001bbe0 100644 --- a/pkg/cmd/pr/create/create.go +++ b/pkg/cmd/pr/create/create.go @@ -432,7 +432,7 @@ func initDefaultTitleBody(ctx CreateContext, state *shared.IssueMetadataState, u state.Title = humanize(headRef) var body strings.Builder for i := len(commits) - 1; i >= 0; i-- { - fmt.Fprintf(&body, "- %s\n", commits[i].Title) + fmt.Fprintf(&body, "- **%s**\n", commits[i].Title) if addBody { x := regexPattern.ReplaceAllString(commits[i].Body, " ") fmt.Fprintf(&body, "%s", x) diff --git a/pkg/cmd/pr/create/create_test.go b/pkg/cmd/pr/create/create_test.go index c088e4169d4..bd878a8c434 100644 --- a/pkg/cmd/pr/create/create_test.go +++ b/pkg/cmd/pr/create/create_test.go @@ -623,7 +623,7 @@ func Test_createRun(t *testing.T) { } } } } `, func(input map[string]interface{}) { assert.Equal(t, "my title", input["title"].(string)) - assert.Equal(t, "- commit 1\n- commit 0\n\nthis is a bug", input["body"].(string)) + assert.Equal(t, "- **commit 1**\n- **commit 0**\n\nthis is a bug", input["body"].(string)) })) }, cmdStubs: func(cs *run.CommandStubber) {