File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ jobs:
154154 commits = event.get("commits", [])
155155 compare_url = event.get("compare", "")
156156 caption_limit = 1024
157- branch_text = "Branch: HyperOS 3"
157+ branch_text = "Branch:\nHyperOS 3"
158158
159159 def escape_code_block(text):
160160 return text.replace("\\", "\\\\").replace("`", "\\`")
@@ -212,13 +212,16 @@ jobs:
212212 def build_code_block(text):
213213 return f"```{escape_code_block(text)}```"
214214
215+ def build_multiline_code_block(text):
216+ return f"```\n{escape_code_block(text)}```"
217+
215218 def build_caption(commit_entries, contributors_text):
216219 lines = [
217220 "New push to GitHub",
218221 build_code_block(branch_text),
219222 "",
220223 "Commits:",
221- build_code_block (build_commit_text(commit_entries)),
224+ build_multiline_code_block (build_commit_text(commit_entries)),
222225 "",
223226 f"Contributors: {build_code_block(contributors_text)}",
224227 ]
You can’t perform that action at this time.
0 commit comments