Skip to content

Commit

Permalink
dev-tools/cherrypick_pr: Support non-ascii characters in PR title and…
Browse files Browse the repository at this point in the history
… description (elastic#8827)

The script in dev-tools/cherrypick_pr fails to create a PR in Github if the original PR title or description contains non-ascii characters.
  • Loading branch information
adriansr authored Nov 2, 2018
1 parent 10a7f94 commit a5867d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev-tools/cherrypick_pr
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def main():

# create PR
request = session.post(base + "/pulls", json=dict(
title="Cherry-pick #{} to {}: {}".format(args.pr_number, args.to_branch, original_pr["title"]),
title="Cherry-pick #{} to {}: {}".format(args.pr_number, args.to_branch, original_pr["title"].encode('utf-8')),
head=remote_user + ":" + tmp_branch,
base=args.to_branch,
body="Cherry-pick of PR #{} to {} branch. Original message: \n\n{}"
.format(args.pr_number, args.to_branch, original_pr["body"])
.format(args.pr_number, args.to_branch, original_pr["body"].encode('utf-8'))
))
if request.status_code > 299:
print("Creating PR failed: {}".format(request.json()))
Expand Down

0 comments on commit a5867d0

Please sign in to comment.