diff --git a/.github/ISSUE_TEMPLATE/auto_bug_report.md b/.github/ISSUE_TEMPLATE/auto_bug_report.md new file mode 100644 index 00000000..a2a81736 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/auto_bug_report.md @@ -0,0 +1,11 @@ +--- +name: Auto Bug Report +about: Automated bug report from Archon +title: '' +labels: bug, auto-report +assignees: '' +--- + + + + diff --git a/python/src/server/api_routes/bug_report_api.py b/python/src/server/api_routes/bug_report_api.py index 2fd30610..f733d10c 100644 --- a/python/src/server/api_routes/bug_report_api.py +++ b/python/src/server/api_routes/bug_report_api.py @@ -247,9 +247,10 @@ def _create_manual_submission_response(bug_report: BugReportRequest) -> BugRepor base_url = f"https://github.com/{github_service.repo}/issues/new" - # GitHub only supports title and body parameters for pre-filling - # Labels cannot be set via URL (requires API or manual selection) + # Use Markdown template for structured layout with URL pre-filling support + # YAML templates don't support URL parameters, but Markdown templates do params = { + "template": "auto_bug_report.md", "title": bug_report.title, "body": issue_body, } diff --git a/python/tests/server/api_routes/test_bug_report_api.py b/python/tests/server/api_routes/test_bug_report_api.py index 16055313..e03b786f 100644 --- a/python/tests/server/api_routes/test_bug_report_api.py +++ b/python/tests/server/api_routes/test_bug_report_api.py @@ -119,10 +119,10 @@ def test_manual_submission_url_uses_correct_repo(client, mock_bug_report): # Ensure old repository is NOT in URL assert "dynamous-community" not in data["issue_url"] assert "Archon-V2-Alpha" not in data["issue_url"] - # Verify URL contains title and body parameters (not template) + # Verify URL contains required parameters including template assert "title=" in data["issue_url"] assert "body=" in data["issue_url"] - assert "template=" not in data["issue_url"] + assert "template=auto_bug_report.md" in data["issue_url"] def test_api_submission_with_token(client, mock_bug_report):