Skip to content
gohacks.dev
Tooling

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

PathMatched patternOwnersRule
README.md*@acme/coreline 2
frontend/src/app/page.tsx/frontend/@acme/webline 5
frontend/src/app/globals.css*.css@acme/designline 6
deploy/scripts/deploy.sh/deploy/@acme/sre @adaline 9
backend/database/migrations/2026_10_01_create_users.php**/migrations/@acme/dataline 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.

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.

Share

Frequently asked questions

Where does the CODEOWNERS file go?
In .github/, the repository root or docs/, on the base branch of pull requests. GitHub uses the first one it finds in that order.
Do code owners have to approve?
Only when branch protection requires review from code owners. Otherwise they are just requested as reviewers.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools