Skip to content

[6/7] CLI wiring end-to-end #182

Description

@shouze

Context

github-code-search.ts currently parses --group-by-team-prefix as a flat comma-separated prefix list and calls fetchRepoTeams (src/api.ts) with that flat list; fetchRepoTeams's signature is prefix-list agnostic and does not need to change. This issue integrates all previous sub-issues into the actual CLI surface.

Part of EPIC #125. Depends on #177, #178, #179, #180, #181.

Solution

  • Parse the new --group-by-team-prefix chain grammar: / separates hierarchy levels within one chain, , separates independent sibling hierarchies (confirm and document the exact grammar, including edge cases like leading/trailing /, empty segments, duplicate prefixes across chains).
  • Flatten all distinct prefix segments across all chains/levels before calling fetchRepoTeams (no changes needed to fetchRepoTeams itself).
  • Wire the consolidation flag from [2/7] Advanced consolidated rendering #178 and the pick-team addressing from [5/7] --pick-team / re-pick across all hierarchy levels #181 into the CLI options and validation/warning logic.
  • Expand stderr validation messages for malformed chains.

Acceptance Criteria

  • --group-by-team-prefix "gamme-/squad-,chapter-" is parsed into one 2-level chain (gamme-, squad-) and one 1-level chain (chapter-).
  • Malformed input (empty segment, stray /) produces a clear stderr warning and a sane fallback (e.g. treat as a flat single-level prefix), not a crash.
  • End-to-end manual run against a real or fixture GitHub org produces the expected nested markdown/JSON/TUI output.

Definition of Done

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions