Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

## Unreleased

- **Native Idea feature-request form (PATCH, 2026-11-26):** Recognize a first-party YAML feature_request/feature-request form explicitly named Idea (Filament); retain declared-name checks, required fields, ambiguous-channel and exact consent gates. A filename alone or an unrelated Idea form does not establish a feature route.

- **Verified template-free native Issue route (PATCH, 2026-11-26):** Recognize a blank Issue only after pinned local/inherited configuration and legacy template checks plus GitHub GraphQL confirmation of an empty effective template list, enabled Issues and matching default HEAD. Preserve unknown/forbidden channel, original payload, history, PAUSE and exact consent gates.

- **Inherited native Issue forms (PATCH, 2026-11-26):** Resolve public owner/.github default templates only when no local directory/config exists, pin the effective source and identify Feature Request forms by declared name (including feature.yml). Preserve local precedence, unknown-channel, native-field, original-head and consent gates.
Expand Down
5 changes: 5 additions & 0 deletions scripts/preflight_publication_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ def classify_issue_templates(templates, source, ref):
else:
header = template
feature = bool(re.search(r"(?mi)^name:[ \t]*[\"']?feature[ \t]+request[\"']?[ \t]*$", header))
# Some maintainers call the canonical feature-request form "Idea".
# Require both the verified native form name and conventional filename;
# an arbitrary Idea form or a misleading filename alone is insufficient.
if not feature and re.fullmatch(r"feature[_-]request\.ya?ml", name, re.I):
feature = bool(re.search(r"(?mi)^name:[ \t]*[\"']?idea[\"']?[ \t]*$", header))
classified.append({**entry, "feature_request": feature})
contents[name] = template
return classified, contents
Expand Down
29 changes: 29 additions & 0 deletions tests/test_publication_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,35 @@ def test_declared_name_not_filename_and_ambiguous_forms(self):
self.assertEqual([e["name"] for e in classified if destination.is_feature_template(e)],
["01-feature.yml","02-feature.yml"])

def test_filament_native_idea_form_and_required_fields(self):
target = "invertibleMatrix/filament"
entries = [{"name": "feature_request.yml", "type": "file"},
{"name": "bug_report.yml", "type": "file"},
{"name": "other.yml", "type": "file"}]
form = ("name: Idea\n"
"description: Something Filament could do, or do better.\n"
'labels: ["idea"]\n'
"body:\n - type: textarea\n id: need\n"
" attributes:\n label: What you need\n"
" validations:\n required: true\n"
" - type: textarea\n id: how\n"
" attributes:\n label: How it could work\n")
with patch.object(destination, "get_optional_file",
side_effect=[form, "name: Bug Report", form]):
templates, contents = destination.classify_issue_templates(entries, target, "a"*40)
self.assertEqual([x["name"] for x in templates if destination.is_feature_template(x)],
["feature_request.yml"])
self.assertEqual(route_errors(target, target, "original_issue", "feature_request",
repo(target), templates, "blank_issues_enabled: false"), [])
spec = feature_form_requirements(contents["feature_request.yml"])
self.assertEqual(spec["required_fields"], ["What you need"])
self.assertEqual(feature_form_payload_errors(spec, "Proposal", "### What you need\nA bounded improvement"), [])
self.assertIn("NATIVE_FEATURE_REQUIRED_FIELD_MISSING: What you need",
feature_form_payload_errors(spec, "Proposal", "### How it could work\nAn approach"))
self.assertIn("FEATURE_REQUEST_CHANNEL_AMBIGUOUS",
route_errors(target, target, "original_issue", "feature_request", repo(target),
templates, "url: https://github.com/invertibleMatrix/filament/discussions/categories/feature-requests"))

def test_template_fetch_error_not_treated_as_absence(self):
with patch.object(destination,"get_optional_templates",side_effect=RuntimeError("403 Forbidden")), \
patch.object(destination,"gh_api") as api:
Expand Down
Loading