|
1 | 1 | package main |
2 | 2 |
|
3 | 3 | import ( |
| 4 | + "context" |
4 | 5 | "fmt" |
5 | 6 | "net/url" |
6 | 7 | "os" |
@@ -50,8 +51,10 @@ func generateReadmeDocs(readmePath string) error { |
50 | 51 | // Create translation helper |
51 | 52 | t, _ := translations.TranslationHelper() |
52 | 53 |
|
53 | | - // Build inventory - stateless, no dependencies needed for doc generation |
54 | | - r := github.NewInventory(t).Build() |
| 54 | + // Build inventory with all toolsets enabled and no feature checker (all flags return false). |
| 55 | + // This includes tools from all toolsets, but excludes tools with FeatureFlagEnable |
| 56 | + // (not available to regular users) while including tools with FeatureFlagDisable. |
| 57 | + r := github.NewInventory(t).WithToolsets([]string{"all"}).Build() |
55 | 58 |
|
56 | 59 | // Generate toolsets documentation |
57 | 60 | toolsetsDoc := generateToolsetsDoc(r) |
@@ -153,10 +156,10 @@ func generateToolsetsDoc(i *inventory.Inventory) string { |
153 | 156 | } |
154 | 157 |
|
155 | 158 | func generateToolsDoc(r *inventory.Inventory) string { |
156 | | - // AllToolsForDocs() returns tools sorted by toolset ID then tool name, |
157 | | - // excluding tools that require feature flags (not available to regular users). |
158 | | - // We iterate once, grouping by toolset as we encounter them. |
159 | | - tools := r.AllToolsForDocs() |
| 159 | + // Use AvailableTools with the inventory's feature checker (returns false for all flags), |
| 160 | + // which excludes tools requiring a feature flag (FeatureFlagEnable) while keeping |
| 161 | + // tools that are disabled by feature flags (available by default). |
| 162 | + tools := r.AvailableTools(context.Background()) |
160 | 163 | if len(tools) == 0 { |
161 | 164 | return "" |
162 | 165 | } |
|
0 commit comments