hooks: handle non-ascii characters in hooks new pull-requests open template.
This commit is contained in:
parent
03c420a9fc
commit
8e41ca4f0a
1 changed files with 5 additions and 6 deletions
|
|
@ -284,17 +284,16 @@ def post_push(extras):
|
|||
output += _http_ret.title
|
||||
|
||||
if extras.new_refs:
|
||||
tmpl = \
|
||||
extras.server_url + '/' + \
|
||||
extras.repository + \
|
||||
"/pull-request/new?{ref_type}={ref_name}"
|
||||
tmpl = extras.server_url + '/' + extras.repository + \
|
||||
"/pull-request/new?{ref_type}={ref_name}"
|
||||
|
||||
for branch_name in extras.new_refs['branches']:
|
||||
output += 'RhodeCode: open pull request link: {}\n'.format(
|
||||
tmpl.format(ref_type='branch', ref_name=branch_name))
|
||||
tmpl.format(ref_type='branch', ref_name=safe_str(branch_name)))
|
||||
|
||||
for book_name in extras.new_refs['bookmarks']:
|
||||
output += 'RhodeCode: open pull request link: {}\n'.format(
|
||||
tmpl.format(ref_type='bookmark', ref_name=book_name))
|
||||
tmpl.format(ref_type='bookmark', ref_name=safe_str(book_name)))
|
||||
|
||||
hook_response = ''
|
||||
if not is_shadow_repo(extras):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue