CODEOWNERS Tester
Test which CODEOWNERS rule owns each changed file and which teams or users will be requested for review, using GitHub's last-match-wins rule.
Free · No sign-up · Your inputs stay in your browser
Input
Test which CODEOWNERS rule owns a file
Output
6 of 6 paths owned
| Path | Matched pattern | Owners | Rule |
|---|---|---|---|
| README.md | * | @acme/core | line 2 |
| frontend/src/app/page.tsx | /frontend/ | @acme/web | line 5 |
| frontend/src/app/globals.css | *.css | @acme/design | line 6 |
| deploy/scripts/deploy.sh | /deploy/ | @acme/sre @ada | line 9 |
| backend/database/migrations/2026_10_01_create_users.php | **/migrations/ | @acme/data | line 10 |
| docs/setup.md | /docs/ | no owners (explicitly unowned) | line 11 |
The last matching pattern wins, not the most specific one, so put the catch-all * first and narrower rules below it. Patterns follow .gitignore syntax, except that ! negation and [ ] ranges are not supported. A pattern with no owners makes those files unowned, which is how to exempt a directory from a required review.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Last match wins
Unlike many config files, CODEOWNERS uses the last matching pattern, not the most specific one. A catch-all * belongs at the top, and a broad rule placed below a narrow one silently overrides it. A rule with no owners makes matching files unowned, which exempts them from required reviews. See GitHub's about code owners.
Syntax differences
CODEOWNERS follows .gitignore patterns with exceptions: ! negation and character ranges in brackets are not supported, and an invalid line is skipped, which GitHub flags in the file view.