From ab5735f160fdd06d1e66960192e3b935c6cfecc6 Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Wed, 1 Oct 2025 06:50:12 +0100 Subject: [PATCH] appview/pulls: only fill in description from commit if description was left blank Signed-off-by: Will Andrews --- appview/pulls/pulls.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/appview/pulls/pulls.go b/appview/pulls/pulls.go index e5900d4b..0f5e70f9 100644 --- a/appview/pulls/pulls.go +++ b/appview/pulls/pulls.go @@ -1093,7 +1093,7 @@ func (s *Pulls) createPullRequest( // We've already checked earlier if it's diff-based and title is empty, // so if it's still empty now, it's intentionally skipped owing to format-patch. - if title == "" { + if title == "" || body == "" { formatPatches, err := patchutil.ExtractPatches(patch) if err != nil { s.pages.Notice(w, "pull", fmt.Sprintf("Failed to extract patches: %v", err)) @@ -1104,8 +1104,12 @@ func (s *Pulls) createPullRequest( return } - title = formatPatches[0].Title - body = formatPatches[0].Body + if title == "" { + title = formatPatches[0].Title + } + if body == "" { + body = formatPatches[0].Body + } } rkey := tid.TID() -- 2.43.0