diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-07-26 17:19:21 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-07-26 17:19:21 +0300 |
commit | 963b7611442cb262229187e8ddc0f42fd83b5f63 (patch) | |
tree | 3170375b60fb7e141dea66c1d662b131e75203e9 /release/scripts/modules | |
parent | 9270c15af8fc6b1fccf6dd6976f5bd0fe0342790 (diff) |
WM: Pre-fill bug-reports for addons
This is an increment of the proposed changes in D4507.
Differential Revision: https://developer.blender.org/D5303
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_ui_utils/bug_report_url.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/release/scripts/modules/bl_ui_utils/bug_report_url.py b/release/scripts/modules/bl_ui_utils/bug_report_url.py index 510ea5d7e57..33eeb1c278d 100644 --- a/release/scripts/modules/bl_ui_utils/bug_report_url.py +++ b/release/scripts/modules/bl_ui_utils/bug_report_url.py @@ -18,7 +18,7 @@ # <pep8-80 compliant> -def url_prefill_from_blender(): +def url_prefill_from_blender(addon_info = None): import bpy import bgl import struct @@ -44,7 +44,7 @@ def url_prefill_from_blender(): ) fh.write( "\n" - "\n**Blender Version**\n" + "**Blender Version**\n" ) fh.write( "Broken: version: {!s}, branch: {!s}, commit date: {!s} {!s}, hash: `rB{!s}`\n".format( @@ -57,7 +57,18 @@ def url_prefill_from_blender(): ) fh.write( "Worked: (optional)\n" - "\n" + ) + if addon_info: + fh.write( + "\n" + "**Addon Information**\n" + ) + fh.write(( + "Name: {name} {version}\n" + "Author: {author}\n").format(**addon_info) + ) + + fh.write( "\n" "**Short description of error**\n" "[Please fill out a short description of the error here]\n" @@ -70,7 +81,8 @@ def url_prefill_from_blender(): fh.seek(0) + form_number = 2 if addon_info else 1 return ( - "https://developer.blender.org/maniphest/task/edit/form/1?description=" + + "https://developer.blender.org/maniphest/task/edit/form/%i?description=" % form_number + urllib.parse.quote(fh.read()) ) |