feat: Add Markdown issue template to support bug report pre-filling

GitHub's YAML templates (.yml) don't support URL parameter pre-filling, but
Markdown templates (.md) do. This adds a structured bug report template that
allows the automated bug reporter to pre-fill all user-submitted data.

Changes:
- Create .github/ISSUE_TEMPLATE/auto_bug_report.md template
- Update bug_report_api.py to use template=auto_bug_report.md parameter
- Update tests to verify template parameter is included in URL
- Add explanatory comments about YAML vs Markdown template differences

Benefits:
- Users see a structured bug report template (not generic issue form)
- All bug report data is pre-filled from the UI form
- Template provides consistent formatting and organization
- Better UX than generic issue creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
leex279
2025-10-18 12:27:18 +02:00
parent 2f6ad22235
commit fe95a0ab00
3 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
---
name: Auto Bug Report
about: Automated bug report from Archon
title: ''
labels: bug, auto-report
assignees: ''
---
<!-- This template is used for automated bug reports submitted through the Archon UI -->
<!-- The form data below is automatically filled by the bug reporter -->

View File

@@ -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,
}

View File

@@ -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):