Skip to content

Simplify and improve lookup command#1

Merged
feds01 merged 4 commits intomainfrom
improve-lookup
Mar 27, 2025
Merged

Simplify and improve lookup command#1
feds01 merged 4 commits intomainfrom
improve-lookup

Conversation

@feds01
Copy link
Copy Markdown
Owner

@feds01 feds01 commented Mar 27, 2025

  • Expand lookup to list all codeowner teams for an entry
  • Make orphans collector chain more readable
  • Simplify path matching in CODEOWNERS
  • Add comprehensive test suite for CodeOwners

feds01 added 4 commits March 26, 2025 21:10
Since `CODEOWNER`s format supports multiple teams for a single entry,
we should expand the `lookup` command to list all teams that own a
given entry.
rather than comparing full fs paths, we can instead assume that the
root of the comparison is the common root of the codeowners and the
files in question. That way, we can just compare the relative paths
and avoid:

- normalizing paths all of the time
- simplifying redundant regex matches on path parts that will always be the same
@feds01 feds01 self-assigned this Mar 27, 2025
@feds01 feds01 merged commit 50495d8 into main Mar 27, 2025
1 check passed
@feds01 feds01 deleted the improve-lookup branch March 27, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant