Monorepo for Tangled tangled.org

appview/pulls: only fill in description from commit if description was left blank #627

merged opened by willdot.net targeting master from [deleted fork]: feat/pr-creation-descrption
Labels
bugfix
assignee

None yet.

Participants 2
AT URI
at://did:plc:dadhhalkfcq3gucaq25hjqon/sh.tangled.repo.pull/3m24dvdjf5722
+7 -3
Diff #0
+7 -3
appview/pulls/pulls.go
··· 1093 1094 // We've already checked earlier if it's diff-based and title is empty, 1095 // so if it's still empty now, it's intentionally skipped owing to format-patch. 1096 - if title == "" { 1097 formatPatches, err := patchutil.ExtractPatches(patch) 1098 if err != nil { 1099 s.pages.Notice(w, "pull", fmt.Sprintf("Failed to extract patches: %v", err)) ··· 1104 return 1105 } 1106 1107 - title = formatPatches[0].Title 1108 - body = formatPatches[0].Body 1109 } 1110 1111 rkey := tid.TID()
··· 1093 1094 // We've already checked earlier if it's diff-based and title is empty, 1095 // so if it's still empty now, it's intentionally skipped owing to format-patch. 1096 + if title == "" || body == "" { 1097 formatPatches, err := patchutil.ExtractPatches(patch) 1098 if err != nil { 1099 s.pages.Notice(w, "pull", fmt.Sprintf("Failed to extract patches: %v", err)) ··· 1104 return 1105 } 1106 1107 + if title == "" { 1108 + title = formatPatches[0].Title 1109 + } 1110 + if body == "" { 1111 + body = formatPatches[0].Body 1112 + } 1113 } 1114 1115 rkey := tid.TID()

History

1 round 1 comment
sign up or login to add to the discussion
willdot.net submitted #0
1 commit
expand
ab5735f1
appview/pulls: only fill in description from commit if description was left blank
expand 1 comment

lgtm thanks!

pull request successfully merged