feat: let agents.yml override the GitHub repo description

This commit is contained in:
tiennm99 committed 2026-09-29 13:08:18 +07:00
1 parent 14a013a151
commit ebe7bce900
7 files changed
+88 -3

No files matched your search

+14
View File
@@ -51,6 +51,8 @@ func TestFetchStats_ChunkingHappyPath(t *testing.T) {
for i := range agents {
agents[i] = Agent{Owner: "org", Repo: fmt.Sprintf("repo%02d", i), Tags: []string{"terminal", "community"}}
}
// A curated description in agents.yml replaces the GitHub one.
agents[3].Description = "curated"
var requestCount int
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -114,6 +116,18 @@ func TestFetchStats_ChunkingHappyPath(t *testing.T) {
if !found {
t.Error("expected org/repo52 (second chunk) in results")
}
for _, s := range stats {
switch s.NameWithOwner {
case "org/repo03":
if s.Description != "curated" {
t.Errorf("org/repo03: expected curated description, got %q", s.Description)
}
case "org/repo04":
if s.Description != "desc 4" {
t.Errorf("org/repo04: expected GitHub description, got %q", s.Description)
}
}
}
}
func TestFetchStats_MissingNodeNamesTheRepo(t *testing.T) {