Feature: collapse codeowners into directories when possible #98
Open
Description
Suggested solution
Right now, the code owners generation will granularly denote codeowners for each file in the git tree:
path/to/file1 @jpmcb
path/to/file2 @jpmcb
path/to/file3 @jpmcb
In this case, it makes sense to just collapse the directory to:
path/to/ @jpmcb
since all files under that tree are owned by that person. There are probably 1000 and 1 edge cases on this so it'll be critical to think through the data structures and the algorithms for how this would work. Likely, off the top of my head, we'd probably want to take a tree traversal approach where we go deep first over breadth.