Skip to content

Commit f35d51c

Browse files
rdmuellerclaude
andcommitted
feat: leave out forks and excluded repos
Forks are skipped automatically unless overrides.yaml sets include: true (mistral-vibe keeps its documentation site listed); exclude: true hides a repo for good. Removes arc42-generator (fork) and brownfield-experiment from the overview and llms.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3ce473a commit f35d51c

4 files changed

Lines changed: 42 additions & 12 deletions

File tree

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.3.0

‎generate.py‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ def is_http(url):
5959
return urlparse(url).scheme in ("http", "https")
6060

6161

62-
def select_projects(repos, org_site_repo=ORG_SITE_REPO):
63-
chosen = [r for r in repos if r.get("has_pages") and not r.get("archived")
64-
and r["name"].lower() != org_site_repo.lower()]
62+
def select_projects(repos, overrides, org_site_repo=ORG_SITE_REPO):
63+
"""Repos with Pages, minus archived, the org site, excluded ones and forks (unless included)."""
64+
def wanted(r):
65+
ov = overrides.get(r["name"], {})
66+
return (r.get("has_pages") and not r.get("archived")
67+
and r["name"].lower() != org_site_repo.lower()
68+
and not ov.get("exclude") and (not r.get("fork") or ov.get("include")))
69+
chosen = [r for r in repos if wanted(r)]
6570
return sorted(chosen, key=lambda r: r["name"].lower())
6671

6772

@@ -76,8 +81,13 @@ def description(repo, overrides):
7681

7782
def load_overrides(path):
7883
data = yaml.safe_load(path.read_text(encoding="utf-8")) if path.exists() else None
79-
return {str(k): {f: str(v[f]) for f in ("name", "description") if v and v.get(f)}
80-
for k, v in (data or {}).items()}
84+
result = {}
85+
for key, v in (data or {}).items():
86+
v = v or {}
87+
entry = {f: str(v[f]) for f in ("name", "description") if v.get(f)}
88+
entry.update({f: True for f in ("include", "exclude") if v.get(f) is True})
89+
result[str(key)] = entry
90+
return result
8191

8292

8393
def load_yaml(path):
@@ -305,8 +315,8 @@ def main():
305315
args = ap.parse_args()
306316

307317
all_repos = gh_api_list(f"orgs/{args.org}/repos?per_page=100")
308-
repos = select_projects(all_repos)
309318
overrides = load_overrides(ROOT / "overrides.yaml")
319+
repos = select_projects(all_repos, overrides)
310320
links = load_yaml(ROOT / "links.yaml")
311321
# Archived repos keep serving their Pages, so check against every repo name
312322
validate_links(links, [r["name"] for r in all_repos])

‎overrides.yaml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# Per-repository overrides for the overview page and llms.txt.
2-
# Keys are repository names. Both fields are optional and win over the GitHub values,
3-
# so the daily regeneration keeps them. URL and repository link stay unchanged.
2+
# Keys are repository names. All fields are optional; name and description win over
3+
# the GitHub values, so the daily regeneration keeps them. URL and repository link stay unchanged.
4+
# Forks are left out automatically unless they set include: true.
45
#
56
# <repo>:
67
# name: Display name
78
# description: Short description
9+
# include: true # list this repo although it is a fork
10+
# exclude: true # never list this repo
811

912
mistral-vibe:
1013
name: Mistral Vibe Doku
14+
include: true # a fork, but the documentation site is ours
1115
description: Documentation of Mistral Vibe, the minimal CLI coding agent – specification, arc42 architecture and ADRs, reverse-engineered from the source code.
1216
Semantic-Anchors:
1317
description: Shared vocabulary for LLM communication – curated semantic anchors and semantic contracts for precise prompts.
1418
vibe-coding-risk-radar:
1519
description: Risk framework for AI-generated code – five dimensions mapped to four risk tiers, with Claude Code skills for assessment and mitigation.
1620
ultrathink.club:
1721
description: An AI think-tank community. Coming soon.
22+
brownfield-experiment:
23+
exclude: true

‎tests/test_generate.py‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,33 @@
1010
ORG = "LLM-Coding"
1111

1212

13-
def repo(name, desc="", pages=True, archived=False, homepage=""):
13+
def repo(name, desc="", pages=True, archived=False, homepage="", fork=False):
1414
return {"name": name, "description": desc, "has_pages": pages,
15-
"archived": archived, "homepage": homepage,
15+
"archived": archived, "homepage": homepage, "fork": fork,
1616
"html_url": f"https://github.com/{ORG}/{name}"}
1717

1818

1919
def test_select_projects_filters_pages_archived_and_org_site():
2020
repos = [repo("b"), repo("a"), repo("no-pages", pages=False),
2121
repo("old", archived=True), repo("llm-coding.github.io")]
22-
names = [r["name"] for r in g.select_projects(repos, "llm-coding.github.io")]
22+
names = [r["name"] for r in g.select_projects(repos, {}, "llm-coding.github.io")]
2323
assert names == ["a", "b"]
2424

2525

26+
def test_select_projects_drops_forks_and_excluded_unless_included():
27+
repos = [repo("own"), repo("fork", fork=True), repo("kept-fork", fork=True),
28+
repo("hidden")]
29+
ov = {"kept-fork": {"include": True}, "hidden": {"exclude": True}}
30+
assert [r["name"] for r in g.select_projects(repos, ov)] == ["kept-fork", "own"]
31+
32+
33+
def test_load_overrides_reads_flags(tmp_path):
34+
f = tmp_path / "o.yaml"
35+
f.write_text("a:\n name: A\n exclude: true\nb:\n include: true\n")
36+
assert g.load_overrides(f) == {"a": {"name": "A", "exclude": True},
37+
"b": {"include": True}}
38+
39+
2640
def test_overrides_win_over_github_for_name_and_description():
2741
ov = {"x": {"name": "X Docs", "description": "Override"}}
2842
assert g.display_name(repo("x"), ov) == "X Docs"

0 commit comments

Comments
 (0)