Skip to content

Commit 3ea0449

Browse files
Merge pull request #440 from Loup-Garou911XD/main
bug report btn autofills form
2 parents a55712e + 13a86be commit 3ea0449

5 files changed

Lines changed: 141 additions & 63 deletions

File tree

.github/ISSUE_TEMPLATE/plugin-bug-report.md

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Plugin Bug Report
2+
description: Create a report about a plugin to help us improve.
3+
title: '[PLUGIN BUG]: <plugin-name>'
4+
labels: ['Plugin Bug']
5+
6+
body:
7+
- type: input
8+
id: plugin-name
9+
attributes:
10+
label: Plugin Name
11+
description: The name of the plugin experiencing the bug.
12+
placeholder: e.g. colorscheme
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: bug-description
18+
attributes:
19+
label: Describe the bug
20+
description: A clear and concise description of what the bug is.
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: console-log
26+
attributes:
27+
label: Console Log
28+
description: Goto settings -> advanced -> Dev Tools -> enable "Show dev console button" and reproduce the bug. Then copy and paste the console log here.
29+
30+
- type: textarea
31+
id: reproduction-steps
32+
attributes:
33+
label: To Reproduce
34+
description: Steps to reproduce the behavior.
35+
placeholder: |
36+
1. Go to '...'
37+
2. Click on '....'
38+
3. Scroll down to '....'
39+
4. See error
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: expected-behavior
45+
attributes:
46+
label: Expected behavior
47+
description: A clear and concise description of what you expected to happen.
48+
49+
- type: input
50+
id: os-version
51+
attributes:
52+
label: OS with Version
53+
placeholder: e.g. Windows 11 / Android 13
54+
55+
- type: input
56+
id: bombsquad-version
57+
attributes:
58+
label: BombSquad Version
59+
placeholder: e.g. v1.7.60
60+
validations:
61+
required: true
62+
63+
- type: input
64+
id: plugin-manager-version
65+
attributes:
66+
label: Plugin Manager Version
67+
placeholder: e.g. v1.1.10
68+
validations:
69+
required: true
70+
71+
- type: input
72+
id: plugin-version
73+
attributes:
74+
label: Plugin Version
75+
placeholder: e.g. 2.0.1
76+
validations:
77+
required: true
78+
79+
- type: textarea
80+
id: screenshots
81+
attributes:
82+
label: Screenshots
83+
description: Drag and drop screenshots here to help explain the problem.
84+
85+
- type: textarea
86+
id: additional-context
87+
attributes:
88+
label: Additional context
89+
description: Add any other context about the problem here (logs, other plugins installed, etc).

CHANGELOG.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Plugin Manager (dd-mm-yyyy)
22

3+
### 1.1.7 (15-02-2026)
4+
5+
- Added function to fill form details for plugin bug report button
6+
- Added a new plugin bug report yaml template
7+
38
### 1.1.6 (26-01-2026)
49

510
- Fix UI scaling for more window
@@ -31,15 +36,15 @@
3136
### 1.1.1 (09-02-2025)
3237

3338
- Added bomb spinner widget for loading animation.
34-
39+
3540
### 1.1.0 (23-01-2025)
3641

37-
- Updated to bombsquad api 9.
38-
42+
- Updated to bombsquad api 9.
43+
3944
### 1.0.23 (13-01-2025)
4045

4146
- Fixed a bug which wasn't letting older versions run Plugin Manager.
42-
47+
4348
### 1.0.22 (07-08-2024)
4449

4550
- Fixed a few Errors and UI Bugs.
@@ -193,13 +198,11 @@
193198
- Added New Option in settings for Notifying new plugins.
194199
- Added a Discord Button to join Bombsquad's Official Discord server.
195200

196-
197201
### 0.1.6 (15-09-2022)
198202

199203
- Distinguish the settings button with a cyan color (previously was green) in plugin manager window.
200204
- Clean up some internal code.
201205

202-
203206
### 0.1.5 (08-09-2022)
204207

205208
- Plugin files that export classes besides plugin or game, now work.

index.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
33
"versions": {
4+
"1.1.7": {
5+
"api_version": 9,
6+
"commit_sha": "af881af",
7+
"released_on": "15-02-2026",
8+
"md5sum": "454cbacd47c813154f2f9cb0d2736067"
9+
},
410
"1.1.6": {
511
"api_version": 9,
612
"commit_sha": "b0c463e",

plugin_manager.py

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Modules used for overriding AllSettingsWindow
2727
import logging
2828

29-
PLUGIN_MANAGER_VERSION = "1.1.6"
29+
PLUGIN_MANAGER_VERSION = "1.1.7"
3030
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
3131
# Current tag can be changed to "staging" or any other branch in
3232
# plugin manager repo for testing purpose.
@@ -35,8 +35,8 @@
3535
_env = babase.env()
3636
_app_api_version = babase.app.env.api_version
3737

38-
PLUGIN_ISSUE_TEMPLATE = "plugin-bug-report.md"
39-
GITHUB_ISSUE_META = "{repository_url}/issues/new?template={issue_template}"
38+
PLUGIN_ISSUE_TEMPLATE = "plugin-bug-report.yml"
39+
GITHUB_PLUGIN_ISSUE_META = "{repository_url}/issues/new?template={issue_template}"
4040
INDEX_META = "{repository_url}/{content_type}/{tag}/index.json"
4141
CHANGELOG_META = "{repository_url}/{content_type}/{tag}/CHANGELOG.md"
4242
HEADERS = {
@@ -1798,8 +1798,10 @@ async def update(self):
17981798

17991799

18001800
class MoreWindow:
1801-
def __init__(self, plugin, origin=None):
1801+
def __init__(self, plugin: Plugin, origin=None):
18021802
_add_popup(self)
1803+
1804+
self.plugin = plugin
18031805
# collect info
18041806
last_updated = None
18051807
for value in plugin.info['versions'].values():
@@ -1912,13 +1914,7 @@ def __init__(self, plugin, origin=None):
19121914
button_type='square',
19131915
color=(0.6, 0.53, 0.63),
19141916
label='',
1915-
on_activate_call=bui.CallPartial(
1916-
bui.open_url,
1917-
GITHUB_ISSUE_META.format(
1918-
repository_url=REPOSITORY_URL,
1919-
issue_template=PLUGIN_ISSUE_TEMPLATE
1920-
)
1921-
)
1917+
on_activate_call=self._open_bug_report_url
19221918
)
19231919
bui.imagewidget(
19241920
parent=self._root_widget,
@@ -1985,6 +1981,36 @@ def __init__(self, plugin, origin=None):
19851981
down_widget=source_button
19861982
)
19871983

1984+
def _open_bug_report_url(self):
1985+
import platform
1986+
import urllib.parse
1987+
import baenv
1988+
1989+
LOGS_LENGTH_LIMIT = 5000
1990+
_logs = ""
1991+
for entry in baenv._EnvGlobals.get().config.log_handler.get_cached().entries:
1992+
_logs += entry.message + "\n"
1993+
1994+
# reduce this more if it's too long
1995+
error_logs = f"""```py
1996+
{_logs[:LOGS_LENGTH_LIMIT]}
1997+
```"""
1998+
1999+
params = {
2000+
"title": "[PLUGIN BUG]: " + self.plugin.name,
2001+
"plugin-name": self.plugin.name,
2002+
"plugin-version": self.plugin.create_local().version if self.plugin.is_installed else 'Not Installed',
2003+
"plugin-manager-version": 'v' + PLUGIN_MANAGER_VERSION,
2004+
"bombsquad-version": 'v' + babase.app.env.engine_version + " (" + str(babase.app.env.engine_build_number) + ")",
2005+
"os-version": platform.platform() if platform else babase.app.env.platform.value + babase.app.env.os_version,
2006+
"console-log": error_logs
2007+
}
2008+
query_string = urllib.parse.urlencode(params, quote_via=urllib.parse.quote)
2009+
base_url = GITHUB_PLUGIN_ISSUE_META.format(
2010+
repository_url=REPOSITORY_URL, issue_template=PLUGIN_ISSUE_TEMPLATE)
2011+
final_url = f"{base_url}&{query_string}"
2012+
bui.open_url(final_url)
2013+
19882014
def _back(self) -> None:
19892015
_remove_popup(self)
19902016
bui.getsound('swish').play()

0 commit comments

Comments
 (0)