added filter to decide what challenges to include
This commit is contained in:
+7
-5
@@ -1,4 +1,4 @@
|
||||
"""The HedgeDoc note, as markdown."""
|
||||
"""The HedgeDoc note, as markdown. It only covers challenges included in this CTF."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import Counter
|
||||
@@ -25,14 +25,14 @@ def render_hedgedoc(ov: Overview, title: str, tags: str = "") -> str:
|
||||
L += ["---", f"tags: {tags}", "---", ""]
|
||||
L += [f"# {title}", "",
|
||||
f"**Last updated:** {stamp}", "",
|
||||
f"*generated by [challenge_status_tracker]({REPO_URL}) from the README.md of every repo in the "
|
||||
f"GitLab challenges group — {len(ov.challenges)} challenges*", "",
|
||||
f"*generated by [challenge_status_tracker]({REPO_URL}) from the README.md of every challenge "
|
||||
f"included in this CTF — {len(ov.challenges)} challenges*", "",
|
||||
" · ".join(f"{STATUS_ICON[s]} **{s or 'unknown'}** {total[s]}"
|
||||
for s in stages if total[s] or s), ""]
|
||||
|
||||
ready = ov.testable
|
||||
L += [f"## ✅ Ready for infra testing ({len(ready)} of {len(ov.challenges)})", "",
|
||||
"*every challenge at Testing Ready or beyond whose repo backs that up — "
|
||||
"*every included challenge at Testing Ready or beyond whose repo backs that up — "
|
||||
"these can be deployed and tested against the infrastructure now*", ""]
|
||||
if ready:
|
||||
L += ["| | Challenge | Category | Difficulty | Status | Event | Author | Tester |",
|
||||
@@ -111,6 +111,8 @@ def render_hedgedoc(ov: Overview, title: str, tags: str = "") -> str:
|
||||
for ch in ov.blank:
|
||||
why = "no README" if ch.repo.readme is None else "README is still the blank template"
|
||||
L.append(f"- [{ch.repo.path}]({ch.repo.web_url}): {why}")
|
||||
if not issues and not ov.blank:
|
||||
for path in ov.unknown:
|
||||
L.append(f"- {path}: in challenges.yml, but no such repo")
|
||||
if not issues and not ov.blank and not ov.unknown:
|
||||
L.append("*nothing — every README is filled in. suspicious.*")
|
||||
return "\n".join(L) + "\n"
|
||||
|
||||
Reference in New Issue
Block a user