01What is CODEOWNERS Tester?
A CODEOWNERS file decides who GitHub asks to review a pull request. One misplaced line can send every change to the wrong team, and you often find out only after opening the pull request. CODEOWNERS Tester lets you check the rules first. It takes a GitHub CODEOWNERS file and a list of file paths, and shows the owners GitHub would request for each path and the line that decided it. GitHub's docs say the file uses most of the same pattern rules as .gitignore, and that the last matching pattern takes precedence. The tester follows that. It reads the file line by line, skipping blank lines and comments. It turns each pattern into a matcher, then tests every path against every rule and keeps the last one that matches. The pattern rules work like this. A pattern with no slash, such as *.js, matches at any depth. A pattern with a leading or middle slash is anchored to the repository root. A trailing slash matches everything inside that directory, ** matches across directories, and docs/* matches direct children only, as in GitHub's example. A matching line with no owners leaves the path unowned, which is how you exclude a subfolder. Paths are compared case sensitively, as GitHub does. A leading ./ or / on a path you enter is removed before matching. Here is a worked example using the sample file from GitHub's docs. The path src/index.js is owned by @js-owner, decided by line 2, *.js. The path docs/build-app/troubleshooting.md is not a direct child of docs, so docs/* does not match it. It falls back to the global owners from line 1, *. The path apps/github/a.rb matches line 6, /apps/github, which has no owners, so the result is no owners. Lines GitHub would skip are listed with the reason: patterns starting with ! (negation is not supported), patterns using [ ] character ranges, patterns starting with an escaped \#, and lines with owners that are not @user, @org/team or an email address. Fix these, because a skipped line silently changes who owns a path. The tool cannot check whether users or teams exist or have write access, which GitHub also requires. It also does not know which of .github/, the root or docs/ holds your file. GitHub reads those locations in that order and uses the first CODEOWNERS file it finds. Everything runs in your browser, so private team names stay on your machine.
Engineering leads and platform teams who maintain review rules in GitHub repositories. The tool runs entirely in your browser, so your data never leaves your device.
02How to use CODEOWNERS Tester
- Paste the contents of your CODEOWNERS file into the first box
- Enter file paths relative to the repository root, one per line
- Read the owners and the deciding line for each path
- Fix any skipped lines listed in the warning box
- Copy the results as tab-separated text if you need them elsewhere
03Worked examples
- Input:
CODEOWNERS from GitHub's docs; path src/index.js - Result:
@js-owner (line 2: *.js) - Input:
Same file; path docs/build-app/troubleshooting.md - Result:
@global-owner1 @global-owner2 (line 1: *) - docs/* matches direct children only
- Input:
Same file; path apps/github/a.rb - Result:
No owners (line 6: /apps/github) - Input:
Monorepo file (* @acme/platform, /packages/web/ @acme/frontend, /packages/api/ @acme/backend, **/migrations @acme/dba, *.md @acme/docs); paths packages/api/db/migrations/001.sql, packages/api/README.md - Result:
packages/api/db/migrations/001.sql: @acme/dba (line 4: **/migrations) packages/api/README.md: @acme/docs (line 5: *.md) - Later rules override the /packages/api/ team, so migrations go to the DBA team and Markdown to docs.
- Input:
File: * @a, !vendor/ @b, [Mm]akefile @c, Makefile @d @bad owner; paths vendor/lib.js, Makefile - Result:
Skipped: line 2 (negation with ! not supported), line 3 ([ ] ranges not supported), line 4 (invalid owner owner) vendor/lib.js: @a (line 1: *) Makefile: @a (line 1: *) - GitHub skips lines with unsupported or invalid syntax, so both paths fall back to the catch-all rule.
- Input:
File: /docs/ @acme/tech-writers, lib/ @acme/core, *.test.ts @acme/qa; paths docs/intro.md, src/docs/notes.md, packages/x/lib/util.ts, src/lib/util.test.ts - Result:
docs/intro.md: @acme/tech-writers (line 1: /docs/) src/docs/notes.md: (no owners) packages/x/lib/util.ts: @acme/core (line 2: lib/) src/lib/util.test.ts: @acme/qa (line 3: *.test.ts) - A leading slash anchors /docs/ to the repo root, while lib/ matches a lib folder at any depth.
04Common use cases
- Checking who will be requested to review a pull request before opening it
- Debugging why the wrong team owns a folder after a CODEOWNERS edit
- Testing a new rule's order against existing ones before committing
- Confirming a subfolder is unowned when you meant it to be
- Spotting lines GitHub skips for unsupported syntax
05Tips
- Put broad rules such as * near the top and specific ones below, since the last match wins.
- Keep all owners for a pattern on one line; GitHub's docs say otherwise only the last mentioned owner applies.
- Use a pattern with no owners to leave a path without code owners.
- GitHub looks in .github/, then the root, then docs/, and uses the first CODEOWNERS file it finds.
06Related concepts
CODEOWNERS, gitignore patterns, branch protection, required reviewers, glob.
Frequently Asked Questions
What is CODEOWNERS Tester?
CODEOWNERS Tester is a free, browser-based developer tool on AIDToolStack. Free CODEOWNERS tester. Paste your GitHub CODEOWNERS file and file paths to see the matching rule and owners. Last match wins. Runs in your browser. It requires no installation or sign-up and works entirely in your browser.
Is CODEOWNERS Tester free to use?
Yes. No sign-up, no fees and no usage cap.
Does CODEOWNERS Tester store my data?
No. It runs in your browser; nothing is uploaded.