Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix(issue-forms): default parsing tier to unknown

myhlolia3e585186d78
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 6e21fd07..0786d6c3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -90,7 +90,7 @@ body:
- type: dropdown
id: tier
attributes:
- label: Parsing tier (optional)
+ label: Parsing tier
options:
- flash
- basic
@@ -98,6 +98,9 @@ body:
- advanced
- Default selection
- Not applicable / unknown
+ default: 5
+ validations:
+ required: true
- type: markdown
attributes:
diff --git a/.github/ISSUE_TEMPLATE/bug_report_zh.yml b/.github/ISSUE_TEMPLATE/bug_report_zh.yml
index 158f6776..46053749 100644
--- a/.github/ISSUE_TEMPLATE/bug_report_zh.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report_zh.yml
@@ -89,7 +89,7 @@ body:
- type: dropdown
id: tier
attributes:
- label: 解析档位(可选)
+ label: 解析档位
options:
- flash
- basic
@@ -97,6 +97,9 @@ body:
- advanced
- 未显式指定
- 不适用或不清楚
+ default: 5
+ validations:
+ required: true
- type: markdown
attributes:
diff --git a/tests/ci/test_issue_template_release_sync.py b/tests/ci/test_issue_template_release_sync.py
index df5a1045..3c110276 100644
--- a/tests/ci/test_issue_template_release_sync.py
+++ b/tests/ci/test_issue_template_release_sync.py
@@ -334,12 +334,12 @@ def test_issue_forms_are_equivalent_and_keep_unavailable_environment_fallbacks()
attrs = field["attributes"]
required = field.get("validations", {}).get("required", False)
if field_id != "precheck":
- assert required == (field_id != "tier")
+ assert required
assert "value" not in attrs and "\n" not in attrs.get("description", "")
if field["type"] == "dropdown":
options = attrs["options"]
assert len(options) == len(set(options)) and all(isinstance(value, str) for value in options)
- if field_id == "software_version":
+ if field_id in {"software_version", "tier"}:
assert attrs["default"] == len(options) - 1
else:
assert "default" not in attrs
@@ -348,6 +348,11 @@ def test_issue_forms_are_equivalent_and_keep_unavailable_environment_fallbacks()
assert fields["software_version"]["type"] == "dropdown"
assert len(fields["software_version"]["attributes"]["options"]) == 6
assert fields["tier"]["attributes"]["options"][:4] == ["flash", "basic", "standard", "advanced"]
+ # GitHub 对可选下拉自动添加 None,非空约束配合兜底默认值保留免填写体验。
+ tier = fields["tier"]
+ assert tier["attributes"]["options"][tier["attributes"]["default"]] == (
+ "Not applicable / unknown" if template == TEMPLATE else "不适用或不清楚"
+ )
assert fields["device_mode"]["attributes"]["render"] == "text"
assert "mineru-kit hardware info" in fields["device_mode"]["attributes"]["placeholder"]
markdown = "\n".join(field["attributes"]["value"] for field in form["body"] if field["type"] == "markdown")