Add --exclude-team-prefixes: exclude noisy team-name prefixes from grouping - #201
Draft
shouze wants to merge 3 commits into
Draft
Add --exclude-team-prefixes: exclude noisy team-name prefixes from grouping#201shouze wants to merge 3 commits into
shouze wants to merge 3 commits into
Conversation
…ouping Filters teams matching given prefixes out of consideration before groupByTeamHierarchy runs, reducing ambiguous combined sections at the source rather than trying to resolve them after the fact (e.g. many chapter-validators-* sub-teams). A repo left with no matching team after exclusion falls into 'other', same as today. Only applies with --group-by-team-prefix; threaded through the replay command. Closes #200
|
Coverage after merging feat/team-hierarchy-exclude-team-prefixes into feat/team-hierarchy-pick-team-auto will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
🔦 Lighthouse Report
|
Replaces gamme- (Fulll-specific French term) with tribe- (Spotify model terminology) across docs, CLI help text, and tests, and genericizes explicit product/business squad names (squad-dashboard, squad-billing, squad-demat, squad-accounting, squad-bank) to squad-a/b/c/d. chapter- and its specialty names (chapter-backend, chapter-architect, etc.) are kept as-is since they already read as generic engineering domains, not organization-specific identifiers.
|
Coverage after merging feat/team-hierarchy-exclude-team-prefixes into feat/team-hierarchy-pick-team-auto will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…t sub-teams
- groupByTeamHierarchy now tries every level of a chain in order against
what earlier levels of that same chain haven't claimed, so a repo
matching only squad- (not tribe-) in a tribe-/squad- chain is captured
directly instead of falling through to a later chain or 'other'.
- Overlapping single-team labels (e.g. tribe-a / tribe-a-p1) are now
combined into one section ("tribe-a + tribe-a-p1"), like a multi-team
combo, instead of nested into an extra heading level the declared
chain didn't ask for. --pick-team / --pick-team-auto resolve it the
same way as any other combo.
- bucketSingleLevel now drops a team that is a proper prefix-extension
of another team already matched by the same repo (e.g.
chapter-architect-a when chapter-architect is also present), reducing
unwieldy N-way combos down to their genuinely distinct members before
the label is even formed.
Removed the now-dead nestOverlappingLabels/assignLevels in favor of a
flat, union-find-based combineOverlappingLabels. Updated/added group.ts
tests to reproduce all 3 reported bugs and confirm the fixes, and
updated docs/usage/team-grouping.md accordingly.
|
Coverage after merging feat/team-hierarchy-exclude-team-prefixes into feat/team-hierarchy-pick-team-auto will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
--exclude-team-prefixes: filters teams matching given prefixes out of consideration beforegroupByTeamHierarchyruns, reducing ambiguous combined sections at the source rather than trying to resolve them after the fact.src/group.ts: new pureexcludeTeamsByPrefix(groups, excludePrefixes)— removes matching teams from each repo'steamslist. Same case-sensitivestartsWithsemantics as--group-by-team-prefix's own matching, for consistency.github-code-search.ts: new CLI flag (comma-separated, same parsing pattern as--exclude-repositories), applied right after team lists are attached and beforegroupByTeamHierarchy. Warns (no-op) when used without--group-by-team-prefix, mirroring--pick-team/--pick-team-auto.src/output.ts/src/tui.ts: threadedexcludeTeamPrefixesthroughReplayOptions/buildReplayCommand/runInteractiveso a session using the flag replays identically.src/completions.ts: new completion entry.docs/usage/team-grouping.mdand the CLI option row indocs/reference/cli-options.md.A repo left with no matching team after exclusion falls into
"other", exactly like a repo with no matching team today — no special-casing needed.Closes #200. Depends on #198, #199 (branch is stacked on top of them).
How did you verify your code works?
src/group.test.tsforexcludeTeamsByPrefix: removes matching teams, keeps non-matching teams, multiple prefixes, drops a repo's entire team list (falls to "other" once grouped), no-op with empty exclude list, purity/no-mutation.src/output.test.ts/src/completions.test.tsfor replay-command emission and completion scripts.github-code-search help queryshows the new flag with correct help text.bun test(1006 passing),bun run lint,bun run format:check,bun run knip,bun run build.tsall green.