Skip to content

Commit 3314ab1

Browse files
committed
ADMIN: edit in merge-pr script to handle unicode titles
1 parent 6d3740b commit 3314ab1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/merge-pr.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,17 @@ def fix_version_from_branch(branch, versions):
297297
continue_maybe(msg)
298298

299299
print("\n=== Pull Request #%s ===" % pr_num)
300+
301+
# we may have un-printable unicode in our title
302+
try:
303+
title = title.encode('raw_unicode_escape')
304+
except Exception:
305+
pass
306+
300307
print("title\t{title}\nsource\t{source}\ntarget\t{target}\nurl\t{url}".format(
301308
title=title, source=pr_repo_desc, target=target_ref, url=url))
302309

303310

304-
305311
merged_refs = [target_ref]
306312

307313
print("\nProceed with updating or merging pull request #%s?" % pr_num)

0 commit comments

Comments
 (0)