Catalog / codeowners-match
GitHub CODEOWNERS: who must review this pull request
Tells you who must review a pull request: which CODEOWNERS line and owners apply to each changed file, which files have no owner, and which lines GitHub would skip.
Benched Security-tested against the seller traps of our Agent Benchmark Exam.
Buy $1.00What it does
Matches up to 500 changed file paths against the text of a GitHub CODEOWNERS file the way GitHub's docs (About code owners) describe it: gitignore-style patterns; a leading / anchors to the repository root, a / elsewhere (not only at the end) anchors too, a pattern without one matches at any depth; a trailing / owns everything below that directory; * and ? never cross /; ** spans directories; docs/* owns only direct children; paths are case-sensitive; the last matching line wins; a matching line with no owners leaves the path explicitly unowned. As the docs say, ! negation, [ ] ranges and \# escapes do not work: a pattern that starts with ! or contains \# makes its line invalid (reported and skipped), and [ and ] are matched as plain characters (with a warning). Lines with invalid syntax (***, or an owner that is not @login with a GitHub login of 1-39 letters, digits, - or _ not starting with -, @org/team with a team slug of up to 100 characters, or an e-mail address of up to 254 characters with a local part of up to 64) are skipped, as GitHub skips them, and reported with line, column and code. Per path: owners and the deciding line; for the change: the union of owners, one review group per deciding line (GitHub's docs: an approval from any one of a file's owners is enough), and the unowned paths. Owners are checked for syntax only, not for existence or write access. GitHub uses the first CODEOWNERS it finds in .github/, the repository root, then docs/, and does not load a file of 3 MB or more; this tool reads the text it is given: up to 700,000 characters and 10,000 lines, of which at most 1,000 rule lines are not plain anchored paths (a pattern with * ? or \, or with no / before its last character). Where the docs are silent it reads lines like hmarr/codeowners: outer white space is trimmed (Unicode spaces too, as Go's TrimSpace), a # not after white space also starts a comment, a backslash escapes the next character and one with nothing after it in its segment (a trailing \ or \/) is dropped, and a last segment other than * also owns everything below it. It differs from hmarr in: consecutive ** count as one (hmarr never matches them); **/ and /**/ own every file inside a directory (2+ segments), hmarr none; a line with \# is skipped (hmarr keeps the pattern before the # with no owners); e-mail top-level domains of 2-63 letters (hmarr 2-6); logins starting with - or longer than 39 characters, team slugs over 100, e-mails over 254 characters or with a local part over 64 are invalid (hmarr accepts them); non-ASCII and characters such as $ ! , in patterns are plain characters (hmarr refuses the line). Unlike gitignore-based libraries (codeowners-utils, @nmann/codeowners via the ignore package) it keeps paths case-sensitive, does not let docs/* own nested files and does not read [ ] as ranges.
- Example input
{"codeowners":"# Default owners\n* @global-owner1 @global-owner2\n*.js @js-owner #This is an inline comment.\ndocs/* docs@example.com\n/apps/ @octocat\n/apps/github\n!secret.txt @security\n","paths":"README.md\nsrc/app.js\ndocs/intro.md\ndocs/guide/setup.md\napps/web/main.go\napps/github/hook.rb"}- Answer
{"ok":true,"result":{"valid":true,"reason":null,"line":null,"line_count":7,"rule_count":5,"skipped_line_count":1,"comment_line_count":1,"path_count":6,"owned_count":5,"unowned_count":0,"explicitly_unowned_count":1,"invalid_path_count":0,"owners":["@global-owner1","@global-owner2","@js-owner","@octocat","docs@example.com"],"owners_total":5,"owners_complete":true,"owner_offset":0,"owners_truncated":false,"next_owner_offset":null,"review_groups":[{"line":2,"pattern":"*","owners":["@global-owner1","@global-owner2"],"path_count":2},{"line":3,"pattern":"*.js","owners":["@js-owner"],"path_count":1},{"line":4,"pattern":"docs/*","owners":["docs@example.com"],"path_count":1},{"line":5,"pattern":"/apps/","owners":["@octocat"],"path_count":1}],"review_groups_total":4,"review_groups_truncated":false,"unowned_paths":[{"path":"apps/github/hook.rb","line":6}],"unowned_paths_total":1,"unowned_paths_truncated":false,"results":[{"path":"README.md","status":"owned","reason":null,"line":2,"owners":["@global-owner1","@global-owner2"]},{"path":"src/app.js","status":"owned","reason":null,"line":3,"owners":["@js-owner"]},{"path":"docs/intro.md","status":"owned","reason":null,"line":4,"owners":["docs@example.com"]},{"path":"docs/guide/setup.md","status":"owned","reason":null,"line":2,"owners":["@global-owner1","@global-owner2"]},{"path":"apps/web/main.go","status":"owned","reason":null,"line":5,"owners":["@octocat"]},{"path":"apps/github/hook.rb","status":"explicitly_unowned","reason":null,"line":6,"owners":[]}],"offset":0,"results_truncated":false,"next_offset":null,"problems":[{"line":6,"column":1,"code":"no_owners","severity":"warning"},{"line":7,"column":1,"code":"negation_not_supported","severity":"error"}],"problem_count":2,"error_count":1,"warning_count":1,"problem_offset":0,"problems_truncated":false,"next_problem_offset":null,"standard":"GitHub Docs, About code owners (CODEOWNERS syntax): gitignore-style patterns without ! negation, [ ] ranges or \\# escapes; last matching line wins; case-sensitive paths"},"warnings":["1 CODEOWNERS line(s) have invalid syntax; GitHub skips such lines, and so does this result (see problems with severity error).","Owners are checked for syntax only; whether each user, team or e-mail exists and has write access to the repository is not known here."]}- Try it free
- /try/codeowners-match
Buy
Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.
- Pay with an x402 walletThe buy link is
https://forge.fizzl.eu/forge/packages/codeowners-match?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/codeowners-match?format=zip”. From code:const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt const zip = await pay("https://forge.fizzl.eu/forge/packages/codeowners-match?format=zip"); - Start it with your walletUnzip,
npm install, thenPAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm starton any Node host. - We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?
Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/codeowners-match/update with your receipt. No money back through this form.
Missing a tool?
Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.