CodeOwners Filter is a Visual Studio Code extension that gives you a visual representation of the CODEOWNERS
file and helps you generate glob include patterns for any code owner. Whether you're maintaining a large monorepo or just want to quickly see who owns what, this tool simplifies code ownership visibility and automation.
-
🌳 Tree View of Code Owners
See all owners and their files in a collapsible tree grouped by owner. -
✂️ Generate Include Patterns
Easily generate glob patterns to include all files owned by a specific owner — perfect for use in GitHub Actions, linters, or other automation tools. -
📂 Pattern-Aware File Matching
Supports all common CODEOWNERS glob syntax, including*
,**
,/
, and file extensions. -
🔄 Live Updates
Automatically re-parses the CODEOWNERS file when it changes.
Since this extension is currently for internal use only, you'll need to install it locally or download .vsix
file built by me.
-
(Optional, if not installed already) Install
vsce
CLI:npm install -g @vscode/vsce
-
Clone this repository:
git clone https://github.com/akowalska622/codeowners-filter cd codeowners-filter
-
Install dependencies and build (optionally,
vsce
should take care of that):npm install npm run compile
-
Package the extension:
vsce package
This will create a
.vsix
file in your project directory. -
Install in VS Code:
- Open VS Code
- Press
Cmd+Shift+P
to open the Command Palette - Type "Install from VSIX" and select it
- Choose the
.vsix
file you just created - Reload VS Code when prompted
- Download the latest
.vsix
file from GitHub Releases - Open VS Code
- Press
Cmd+Shift+P
to open the Command Palette - Type "Install from VSIX" and select it
- Choose the downloaded
.vsix
file - Reload VS Code
💡 Coming Soon: Once published, you'll be able to install directly from the VS Code Marketplace:
- Open VS Code
- Go to the Extensions panel (
Cmd+Shift+X
)- Search for
CodeOwners Filter
- Click Install
- Reload VS Code
- Open the Codeowner Files view in the Explorer sidebar
- Click the 👥 icon in the view header to select a code owner (you can find it in the Explorer sidebar, at the bottom after Source Control and Search sections)
- Alternatively open the Command Pallette (
Ctrl+Shift+P
orCmd+Shift+P
) and runCode Owners: Select Codeowner
- Browse the tree view to see all files owned by that team/person
- Open the Command Palette (
Ctrl+Shift+P
orCmd+Shift+P
) - Run
Code Owners: Generate Include Pattern and Search
- Select a code owner from the list
- The pattern will be copied to your clipboard and a search will open with the files
- Click the 🔄 icon in the view header
- The tree will update to reflect any changes in the CODEOWNERS file
codeOwners.generateCodeownerTree
: Select a code owner to view their files in the treecodeOwners.generateIncludePattern
: Generate a glob pattern for files owned by a teamcodeOwners.refreshTreeView
: Refresh the tree view
- VS Code 1.97.0 or newer
- A
.github/CODEOWNERS
file in your workspace
Feel free to:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
-
🖱️ Context menu
- Context menu for tree view, similar to the native one
-
🎯 Enhanced Pattern Matching
- Migrate to
minimatch
for more reliable glob pattern handling - Support for negative patterns (e.g.,
!exclude/this/**
) - Improved performance for large codebases
- Migrate to
-
✂️ Advanced Filtering
- Add exclude patterns alongside include patterns
- Support for combining multiple owners
-
✨ UX brushes
- Add loading indicator for rendering tree view (it may take some time for larger repositories)
-
🚀 Future Ideas
- Statistics dashboard showing ownership distribution
- Your suggestions!
This project is licensed under the MIT License.