Managing large-scale migrations in big monorepos with multiple codeowners can be overwhelming. Massive PRs touching thousands of files make it hard for teams to review changes efficiently.
codeowners-git
solves this by:
- Identifying files owned by specific teams using the CODEOWNERS file.
- Creating compact, team-specific branches with only their affected files.
- Streamlining the review process with smaller, targeted PRs.
Screen.Recording.2025-01-28.at.10.37.05.PM.mov
Run commands directly without installation:
npx codeowners-git <command>
npm install -g codeowners-git
Then run commands directly:
codeowners-git <command>
The tool automatically detects CODEOWNERS files in:
.github/CODEOWNERS
docs/CODEOWNERS
CODEOWNERS
(root directory)
List current CODEOWNERS entries.
Usage:
codeowners-git list [options]
Options:
--owner, -o
Filter by specific owner--include, -i
Include specific patterns
Example:
codeowners-git list -o @myteam
Manage branch permissions in CODEOWNERS file.
Usage:
codeowners-git branch [options]
Options:
--owner, -o
Specify owner(s) to add/remove--branch, -b
Specify branch pattern--message, -m
Commit message for changes--no-verify, -n
Skips lint-staged and other checks before committing
Example:
codeowners-git branch -o @myteam -b "feature/*" -m "Add feature branch ownership"
- Clone the repository
- Install dependencies:
bun install
- Make your changes
- Run tests:
bun test
- Submit a pull request
MIT ©