Prechádzať zdrojové kódy

ci(notes): fold feature-table commits into feature bullets, drop table

TheWildJames 1 týždeň pred
rodič
commit
15a0558974
1 zmenil súbory, kde vykonal 48 pridanie a 32 odobranie
  1. 48 32
      .github/workflows/main.yml

+ 48 - 32
.github/workflows/main.yml

@@ -1216,31 +1216,38 @@ jobs:
         lines.append("")
         lines.append("## Features")
         lines.append("")
-        lines.append(f"- **Root:** `{root}`  (All = KernelSU-Next + KernelSU + ReSukiSU)")
-        for f in feats: lines.append(f"- {f}")
-        if not feats: lines.append("- (none)")
-        # feature-to-source mapping
-        lines.append("")
-        lines.append("| Feature | Source | Commit / Branch |")
-        lines.append("|---|---|---|")
-        # root commits
         ksun_branch=env("KSUN_BRANCH","dev-susfs")
         ksun_commit=env("KSUN_COMMIT","")
         ksu_commit=env("KSU_COMMIT","")
         resukisu_commit=env("RESUKISU_COMMIT","")
         kernelsu_commit=env("KERNELSU_COMMIT","")
-        if kernelsu_commit: lines.append(f"| KernelSU-Next (official) | KernelSU-Next/KernelSU-Next#dev | [`{kernelsu_commit[:7]}`](https://github.com/KernelSU-Next/KernelSU-Next/commit/{kernelsu_commit}) |")
-        if ksu_commit: lines.append(f"| KernelSU (tiann) | tiann/KernelSU#main | [`{ksu_commit[:7]}`](https://github.com/tiann/KernelSU/commit/{ksu_commit}) |")
-        if resukisu_commit: lines.append(f"| ReSukiSU | ReSukiSU/ReSukiSU#main | [`{resukisu_commit[:7]}`](https://github.com/ReSukiSU/ReSukiSU/commit/{resukisu_commit}) |")
-        if env("USE_NOMOUNT","true")=="true":
-            nm=env("NOMOUNT_COMMIT","")
-            if nm: lines.append(f"| NoMount | maxsteeel/nomount#dev | [`{nm[:7]}`](https://github.com/maxsteeel/nomount/commit/{nm}) |")
+        nm=env("NOMOUNT_COMMIT","")
+        kp=env("KERNEL_PATCHES_COMMIT","")
+        ak=env("ANYKERNEL3_COMMIT","")
+        ds=env("DROIDSPACES_COMMIT","")
+        _root_urls={"next":"https://github.com/KernelSU-Next/KernelSU-Next/commit/","kernelsu":"https://github.com/tiann/KernelSU/commit/","resukisu":"https://github.com/ReSukiSU/ReSukiSU/commit/"}
+        _root_commits={"next":kernelsu_commit,"kernelsu":ksu_commit,"resukisu":resukisu_commit}
+        _flavors0=[m.get("flavor","") for m in parse_managers(env("MANAGER_LIST","")) if m.get("flavor","")]
+        if not _flavors0:
+            _flavors0={"KernelSU-Next":["next"],"KernelSU":["kernelsu"],"ReSukiSU":["resukisu"],"All":["next","kernelsu","resukisu"]}.get(root,["next","kernelsu","resukisu"])
+        _labels0={"next":"KernelSU-Next","kernelsu":"KernelSU","resukisu":"ReSukiSU"}
+        _rc=[]
+        for _fl0 in _flavors0:
+            _c=_root_commits.get(_fl0,"")
+            if _c and len(_c)==40: _rc.append(f"{_labels0.get(_fl0,_fl0)} [`{_c[:7]}`]({_root_urls[_fl0]}{_c})")
+            elif _c: _rc.append(f"{_labels0.get(_fl0,_fl0)} `{_c}`")
+        lines.append(f"- **Root:** `{root}`  ({' + '.join(_rc)})" if _rc else f"- **Root:** `{root}`")
+        _kp_url="https://github.com/WildKernels/kernel_patches/commit/"
+        _feat_commit={"NoMount":("https://github.com/maxsteeel/nomount/commit/",nm),"Baseband Guard":(_kp_url,kp),"DroidSpaces-OSS":("https://github.com/ravindu644/Droidspaces-OSS/commit/",ds),"Networking":(_kp_url,kp),"NTSync":(_kp_url,kp),"Ptrace Leak Fix":(_kp_url,kp),"Unicode Fix":(_kp_url,kp),"BTF / eBPF / FUSE-BPF":(_kp_url,kp),"Performance Tuning":(_kp_url,kp)}
+        for f in feats:
+            _u,_c=_feat_commit.get(f,("",""))
+            if _c and len(_c)==40: lines.append(f"- {f} [`{_c[:7]}`]({_u}{_c})")
+            elif _c: lines.append(f"- {f} `{_c}`")
+            else: lines.append(f"- {f}")
+        if not feats: lines.append("- (none)")
         kp=env("KERNEL_PATCHES_COMMIT","")
-        if kp: lines.append(f"| BBG / NET / NTSync / BTF / Perf / Ptrace / Unicode | WildKernels/kernel_patches#main | [`{kp[:7]}`](https://github.com/WildKernels/kernel_patches/commit/{kp}) |")
         ak=env("ANYKERNEL3_COMMIT","")
-        if ak: lines.append(f"| AnyKernel3 | WildKernels/AnyKernel3#gki-2.0 | [`{ak[:7]}`](https://github.com/WildKernels/AnyKernel3/commit/{ak}) |")
         ds=env("DROIDSPACES_COMMIT","")
-        if ds: lines.append(f"| DroidSpaces-OSS | ravindu644/Droidspaces-OSS#main | [`{ds[:7]}`](https://github.com/ravindu644/Droidspaces-OSS/commit/{ds}) |")
         lines.append("")
         lines.append("## Kernel Variants")
         lines.append("")
@@ -1447,29 +1454,38 @@ jobs:
           lines.append("")
           lines.append("## Features")
           lines.append("")
-          lines.append(f"- **Root:** `{root}`  (All = KernelSU-Next + KernelSU + ReSukiSU)")
-          for f in feats: lines.append(f"- {f}")
-          if not feats: lines.append("- (none)")
-          lines.append("")
-          lines.append("| Feature | Source | Commit / Branch |")
-          lines.append("|---|---|---|")
           ksun_branch=env("KSUN_BRANCH","dev-susfs")
           ksun_commit=env("KSUN_COMMIT","")
           ksu_commit=env("KSU_COMMIT","")
           resukisu_commit=env("RESUKISU_COMMIT","")
           kernelsu_commit=env("KERNELSU_COMMIT","")
-          if kernelsu_commit: lines.append(f"| KernelSU-Next (official) | KernelSU-Next/KernelSU-Next#dev | [`{kernelsu_commit[:7]}`](https://github.com/KernelSU-Next/KernelSU-Next/commit/{kernelsu_commit}) |")
-          if ksu_commit: lines.append(f"| KernelSU (tiann) | tiann/KernelSU#main | [`{ksu_commit[:7]}`](https://github.com/tiann/KernelSU/commit/{ksu_commit}) |")
-          if resukisu_commit: lines.append(f"| ReSukiSU | ReSukiSU/ReSukiSU#main | [`{resukisu_commit[:7]}`](https://github.com/ReSukiSU/ReSukiSU/commit/{resukisu_commit}) |")
-          if env("USE_NOMOUNT","true")=="true":
-              nm=env("NOMOUNT_COMMIT","")
-              if nm: lines.append(f"| NoMount | maxsteeel/nomount#dev | [`{nm[:7]}`](https://github.com/maxsteeel/nomount/commit/{nm}) |")
+          nm=env("NOMOUNT_COMMIT","")
+          kp=env("KERNEL_PATCHES_COMMIT","")
+          ak=env("ANYKERNEL3_COMMIT","")
+          ds=env("DROIDSPACES_COMMIT","")
+          _root_urls={"next":"https://github.com/KernelSU-Next/KernelSU-Next/commit/","kernelsu":"https://github.com/tiann/KernelSU/commit/","resukisu":"https://github.com/ReSukiSU/ReSukiSU/commit/"}
+          _root_commits={"next":kernelsu_commit,"kernelsu":ksu_commit,"resukisu":resukisu_commit}
+          _flavors0=[m.get("flavor","") for m in parse_managers(env("MANAGER_LIST","")) if m.get("flavor","")]
+          if not _flavors0:
+              _flavors0={"KernelSU-Next":["next"],"KernelSU":["kernelsu"],"ReSukiSU":["resukisu"],"All":["next","kernelsu","resukisu"]}.get(root,["next","kernelsu","resukisu"])
+          _labels0={"next":"KernelSU-Next","kernelsu":"KernelSU","resukisu":"ReSukiSU"}
+          _rc=[]
+          for _fl0 in _flavors0:
+              _c=_root_commits.get(_fl0,"")
+              if _c and len(_c)==40: _rc.append(f"{_labels0.get(_fl0,_fl0)} [`{_c[:7]}`]({_root_urls[_fl0]}{_c})")
+              elif _c: _rc.append(f"{_labels0.get(_fl0,_fl0)} `{_c}`")
+          lines.append(f"- **Root:** `{root}`  ({' + '.join(_rc)})" if _rc else f"- **Root:** `{root}`")
+          _kp_url="https://github.com/WildKernels/kernel_patches/commit/"
+          _feat_commit={"NoMount":("https://github.com/maxsteeel/nomount/commit/",nm),"Baseband Guard":(_kp_url,kp),"DroidSpaces-OSS":("https://github.com/ravindu644/Droidspaces-OSS/commit/",ds),"Networking":(_kp_url,kp),"NTSync":(_kp_url,kp),"Ptrace Leak Fix":(_kp_url,kp),"Unicode Fix":(_kp_url,kp),"BTF / eBPF / FUSE-BPF":(_kp_url,kp),"Performance Tuning":(_kp_url,kp)}
+          for f in feats:
+              _u,_c=_feat_commit.get(f,("",""))
+              if _c and len(_c)==40: lines.append(f"- {f} [`{_c[:7]}`]({_u}{_c})")
+              elif _c: lines.append(f"- {f} `{_c}`")
+              else: lines.append(f"- {f}")
+          if not feats: lines.append("- (none)")
           kp=env("KERNEL_PATCHES_COMMIT","")
-          if kp: lines.append(f"| BBG / NET / NTSync / BTF / Perf / Ptrace / Unicode | WildKernels/kernel_patches#main | [`{kp[:7]}`](https://github.com/WildKernels/kernel_patches/commit/{kp}) |")
           ak=env("ANYKERNEL3_COMMIT","")
-          if ak: lines.append(f"| AnyKernel3 | WildKernels/AnyKernel3#gki-2.0 | [`{ak[:7]}`](https://github.com/WildKernels/AnyKernel3/commit/{ak}) |")
           ds=env("DROIDSPACES_COMMIT","")
-          if ds: lines.append(f"| DroidSpaces-OSS | ravindu644/Droidspaces-OSS#main | [`{ds[:7]}`](https://github.com/ravindu644/Droidspaces-OSS/commit/{ds}) |")
           lines.append("")
           lines.append("## Kernel Variants")
           lines.append("")