Преглед изворни кода

docs: remove OEM placeholders, add custom OEM field

- supported-devices.md: drop Samsung/OnePlus/Other placeholder tables, add 'Don't see your device?' note with link to device-support issue
- device_support.yml: add Custom manufacturer input when Other selected, clarify dropdown description
- update-supported-devices.py: handle custom_oem for Other -> creates new OEM heading dynamically
TheWildJames пре 1 недеља
родитељ
комит
e1feeaa8ec

+ 10 - 1
.github/ISSUE_TEMPLATE/device_support.yml

@@ -11,7 +11,7 @@ body:
     id: manufacturer
     attributes:
       label: Manufacturer
-      description: Pick the table to update
+      description: Pick the table to update, or choose Other to add a new OEM
       options:
         - Google Pixel
         - Samsung
@@ -26,6 +26,15 @@ body:
     validations:
       required: true
 
+  - type: input
+    id: custom_manufacturer
+    attributes:
+      label: Custom manufacturer (if Other)
+      description: If you selected Other, specify the OEM name to create a new table (e.g., Sony, Motorola, Fairphone)
+      placeholder: "e.g., Sony"
+    validations:
+      required: false
+
   - type: input
     id: device
     attributes:

+ 20 - 13
.github/scripts/update-supported-devices.py

@@ -10,13 +10,14 @@ def field(id):
     # we match by id label text variations
     labels = {
         "manufacturer": "Manufacturer",
+        "custom_manufacturer": "Custom manufacturer (if Other)",
         "device": "Device",
         "codename": "Codename",
         "gki_kernel": "GKI Kernel",
         "firmware": "Firmware",
         "status": "Status",
     }
-    label = labels[id]
+    label = labels.get(id, id)
     m = re.search(rf"### {re.escape(label)}\s*\n+([^\n#]+)", ISSUE_BODY)
     if m:
         return m.group(1).strip()
@@ -24,17 +25,6 @@ def field(id):
     m = re.search(rf"### {re.escape(id)}\s*\n+([^\n#]+)", ISSUE_BODY)
     return m.group(1).strip() if m else ""
 
-manufacturer = field("manufacturer") or "Other"
-device = field("device").strip()
-codename = field("codename").strip()
-gki = field("gki_kernel").strip()
-firmware = field("firmware").strip() or "stock"
-status = field("status").strip() or "Supported"
-
-if not device or not codename or not gki:
-    print("missing required fields", file=sys.stderr)
-    sys.exit(0)
-
 heading_map = {
     "Google Pixel": "## Google Pixel",
     "Samsung": "## Samsung",
@@ -47,7 +37,24 @@ heading_map = {
     "Nothing": "## Nothing",
     "Other": "## Other",
 }
-heading = heading_map.get(manufacturer, "## Other")
+
+manufacturer = field("manufacturer") or "Other"
+device = field("device").strip()
+codename = field("codename").strip()
+gki = field("gki_kernel").strip()
+firmware = field("firmware").strip() or "stock"
+status = field("status").strip() or "Supported"
+custom_oem = field("custom_manufacturer").strip()
+# handle custom OEM when Other is selected
+if manufacturer == "Other" and custom_oem and custom_oem.lower() not in ("none", "_no response_", ""):
+    manufacturer = custom_oem.strip().title()
+    heading_map[manufacturer] = f"## {manufacturer}"
+
+if not device or not codename or not gki:
+    print("missing required fields", file=sys.stderr)
+    sys.exit(0)
+
+heading = heading_map.get(manufacturer, f"## {manufacturer}")
 # Xiaomi/POCO/Redmi share same file section expansion if not present -> create heading
 text = MD.read_text()
 if heading not in text and manufacturer in ("Xiaomi", "POCO", "Redmi"):

+ 4 - 15
docs/supported-devices.md

@@ -38,20 +38,9 @@
 | Pixel 11 Pro XL | kodiak | — | — | Expected |
 | Pixel 11 Pro Fold | yogi | — | — | Expected |
 
-## Samsung
+## Don't see your device?
 
-| Device | Codename | GKI Kernel | Firmware | Status |
-|--------|----------|------------|----------|--------|
-| — | — | — | — | Placeholder — add entries |
-
-## OnePlus
-
-| Device | Codename | GKI Kernel | Firmware | Status |
-|--------|----------|------------|----------|--------|
-| — | — | — | — | Placeholder — add entries |
-
-## Other
+> [!NOTE]
+> These lists are maintained by the community — please update as needed!
 
-| Device | Codename | GKI Kernel | Firmware | Status |
-|--------|----------|------------|----------|--------|
-| — | — | — | — | Placeholder — add entries |
+Don't see your OEM or device? [Open a device-support issue](https://github.com/WildKernels/GKI_KernelSU_SUSFS/issues/new?template=device_support.yml) — you can specify any manufacturer and we'll add the table.