Skip to content
IonWarpTry for free
GitHub CODEOWNERS

GitHub CODEOWNERS tester: who owns this file?

A GitHub CODEOWNERS file names who reviews each path in a pull request, and the last matching line wins. Paste your file and the paths a pull request touches: the tester shows the line that wins for each path and who GitHub asks for review.

It follows the rules GitHub publishes, including the ones that differ from .gitignore, and lists every line GitHub would skip.[1] It is free, it needs no signup, and nothing you paste leaves your browser.

Test your CODEOWNERS file

Runs in your browser. Nothing is sent or stored, and there is no signup.

1 line GitHub would skip

  • Line 8 !/apps/billing/legacy.go @acme/billing ! negation does not work in CODEOWNERS.

Who owns each path

  • README.md
    @acme/engineering
    Line 2 wins: *
  • cmd/server/main.go
    @acme/backend
    Line 3 wins: *.go
  • docs/setup.md
    docs@acme.dev
    Line 4 wins: docs/*
  • docs/guides/setup.md
    @acme/engineering
    Line 2 wins: *
  • apps/web/page.tsx
    @acme/apps
    Line 5 wins: /apps/
  • apps/billing/invoice.go
    @acme/billing
    Line 6 wins: /apps/billing/
  • apps/generated/schema.ts
    No owner
    Line 7, /apps/generated, names no owner, so GitHub requests no code owner for it.

This checks the syntax GitHub documents. Only GitHub can check that a user or team exists and has write access to the repository.

How GitHub reads a CODEOWNERS file

  • The last matching line wins

    Order matters, so put broad rules at the top and narrow ones below. A first line of * sets a default owner for everything a later line does not claim.[1]

  • Patterns follow most .gitignore rules

    *.js matches at any depth, docs/* matches files directly in docs but not docs/build-app/guide.md, and a leading / anchors a pattern at the repository root.[1]

  • Three .gitignore habits do not work

    A ! to negate a pattern, [ ] to define a range, and a backslash to escape a pattern that starts with #. GitHub skips a line it cannot read and keeps the rest of the file.[1]

  • A line with no owners clears them

    /apps/github with nothing after it leaves those files with no code owner, so anyone with write access can approve them.[1]

  • Paths are case sensitive

    GitHub uses a case-sensitive file system, so /Docs/ does not match docs/, even on a Mac where both open the same folder.[1]

  • Owners need write access

    A user or team that does not exist, or lacks explicit write access to the repository, is not requested for review.[1]

A CODEOWNERS file to start from

# Default owners for everything not listed below.
*                 @your-org/engineering

# Order matters: these win over the line above.
*.go              @your-org/backend
/docs/            @your-org/docs
/.github/         @your-org/platform

# Owned by no one: anyone with write access can approve.
/generated/
  1. Save it where GitHub looks

    Name the file CODEOWNERS and put it in .github/, the repository root or docs/. GitHub searches in that order and uses the first one it finds.[1]

  2. Require the approval

    Code owners are requested for review automatically. To make their approval required before a merge, turn on Require review from Code Owners in the branch protection rule.[1]

  3. Test it on real paths

    git diff --name-only main prints the paths a branch touches. Paste them above with the file to see who would be asked.

  4. Add a first review

    CODEOWNERS says who must review. IonWarp reviews the pull request first: one comment, with the file and line each finding points to.

Pricing

Simple pricing for your whole team.

One workspace price with seats included. Credits pool across your team. Unlimited repos on every plan.

Starter

$0 /mo

Try AI PR review.

  • 2 reviewers
    • Code Review
    • Security Review
  • 3 seats included
  • 15,000 credits to start, then 5,000/mo
  • Unlimited repos
Get Started

Max

$149 /mo

Scale AI PR review.

  • +9 reviewers
    • UX Review
    • API Performance
    • Analytics Review
    • SEO Review
    • Changelog
    • CI/CD Performance
    • Plan Review
    • Repeat-Failure Learnings
    • SOC 2 Review
  • 10 seats included
  • +75,000 credits/mo
  • +$29/mo per added seat
  • Unlimited repos
  • Priority support
Choose Max
Enterprise

Custom reviewers + credits · GitHub Enterprise · SSO/SAML + audit logs · Custom security review + SLA

Contact us
FAQ

Frequently asked questions

What is a CODEOWNERS file?

A file in a GitHub repository that maps path patterns to the people or teams who own them. When a pull request changes a file, GitHub requests a review from that file's code owners.

Where does the CODEOWNERS file go?

In .github/, the repository root or docs/. If there is more than one, GitHub uses the first it finds, in that order. Each branch has its own file.

Does the last CODEOWNERS rule win?

Yes. GitHub uses the last line in the file whose pattern matches the path, so put broad rules first and narrow ones after them.

Why is my CODEOWNERS rule not working?

The usual causes are a later line that also matches, a line GitHub skips because it uses ! or [ ], a path in the wrong case, or a team without explicit write access. The tester shows the first three.

Does this tester work for GitLab?

It follows GitHub's rules. GitLab adds sections such as [Go] and ^[Go], and the last matching entry in each section applies, so one file can have owners from several sections (GitLab docs, Nov 2026).

Is the CODEOWNERS tester free?

Yes. There is no signup and nothing to install. It runs in your browser, and nothing you paste is sent anywhere.

Sources

  1. About code ownersGitHub Docs · read