Skip to content

Commit

Permalink
Make commit title in bold
Browse files Browse the repository at this point in the history
  • Loading branch information
guerinoni committed Feb 1, 2024
1 parent 4261317 commit 3409d06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/pr/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/pr/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3409d06

Please sign in to comment.