---
title: "CODEOWNERS requests reviews; only a branch rule makes them required | Proofline"
description: "A CODEOWNERS file on its own only asks owners to review, and any approval from someone with write access can still merge their code."
url: https://proofline.sh/learn/code-owner-review-requested-but-not-required/
---

[Learning center](/learn/)

# CODEOWNERS requests reviews; only a branch rule makes them required

A CODEOWNERS file on its own only asks owners to review, and any approval from someone with write access can still merge their code. To enforce ownership, turn on code owner review in the branch protection rule or ruleset that covers the branch, after you have checked the file for errors.

Code review The Proofline team November 23, 2026 4 min read

## What CODEOWNERS does by itself

GitHub's docs describe the file's default effect as a request: "Code owners are automatically requested for review when someone opens a pull request that modifies code that they own." Draft pull requests are an exception until they are marked ready. Enforcement is a separate step: "When someone with admin or owner permissions has enabled required reviews, they also can optionally require approval from a code owner before the author can merge a pull request." [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)

With that option on, "any pull request that affects code with a code owner must be approved by that code owner before the pull request can be merged into the protected branch." [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging) In a ruleset, the switch is `require_code_owner_review`, described as "Require an approving review in pull requests that modify files that have a designated code owner." [Create a repository ruleset](https://docs.github.com/en/rest/repos/rules#create-a-repository-ruleset)

So the same file means two different things depending on a setting stored elsewhere. Someone reading CODEOWNERS cannot tell which one applies.

## A fictional refund change that went around its owners

Suppose a fictional repository, `acme/payments`, has this CODEOWNERS file in `.github/`:

```
*                 @acme/platform
/src/refunds/     @acme/payments-risk
```

The branch rule on `main` requires one approval, and code owner review is off. Tess, on the platform team, opens a pull request that changes `src/refunds/limits.ts` to raise the automatic refund ceiling during a migration. GitHub requests a review from `@acme/payments-risk`. Uma, a platform teammate, approves within minutes. CI is green, because the limit is a constant and the tests read it. Tess merges.

The risk team's review request is still pending on a merged pull request. Nothing failed: the file did what it does by default, and the rule did what it was configured to do. The repository looked as if refunds had an owner who must approve, and it had an owner who was asked.

With Require review from Code Owners turned on, Uma's approval would satisfy the one-approval count but not the owner requirement, and the merge box would wait for a member of `@acme/payments-risk`.

## Advisory and enforced ownership compared

| Question | Code owner review off | Code owner review on |
| --- | --- | --- |
| Who is asked to review | Owners of changed paths, automatically | Same |
| Whose approval satisfies the rule | Any writer, up to the required count | Any writer for the count, plus one owner of each owned path changed |
| How many owners must approve a path with several | None | Any one of them |
| A line naming a user or team that lacks write access | That owner is not assigned | Same, so the path can lose its required owner with no error at merge time |
| Paths with no matching line | Any writer | Any writer |

The fourth row is why enforcement can still fail quietly. "If you specify a user or team that doesn't exist or has insufficient access, a code owner will not be assigned," and "if any line in your CODEOWNERS file contains invalid syntax, that line will be skipped." A file over 3 MB "will not be loaded" at all. [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) Audit the file before you enforce it, as the [guide to CODEOWNERS errors](/learn/codeowners-errors-before-requiring-review/) describes.

## What enforcement does not catch

Enforced ownership means one owner approved. When reviews from code owners are required, "an approval from _any_ of the owners is sufficient," so a line with two teams needs only one of them. [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-and-branch-protection) It also says nothing about how carefully the owner read the change.

It does not protect the file that defines it. A pull request that edits CODEOWNERS gets its review requests from the version on the base branch, but once it merges, the new version decides every later review. The docs advise that "to protect a repository fully against unauthorized changes, you also need to define an owner for the CODEOWNERS file itself." The [guide to owning the CODEOWNERS file](/learn/codeowners-owner-of-the-codeowners-file/) covers that.

## The cost of enforcing

Every owner team becomes a required stop for its paths. A team that is small, away or overloaded holds up every pull request that touches its code, and a broad change that crosses many owned paths waits for every one of those teams. The [guide to large cross-cutting changes](/learn/codeowners-large-cross-cutting-change/) covers splitting and staging those.

Advisory ownership has a cost too, just a less visible one: owners learn that their review requests are optional, and the requests become noise they filter out.

## Decide and configure

Keep CODEOWNERS advisory while ownership is still being worked out: teams are being formed, the file has errors, or owners have not agreed to be on the hook. Enforce it once the file is clean and each owner team has agreed to respond within a working day.

1.  Fix every error GitHub reports for the file, and confirm each team has explicit write access.
2.  Give the CODEOWNERS file and `.github/` an owner of their own.
3.  In the classic rule for the branch, select **Require a pull request before merging**, then **Require review from Code Owners**. In a ruleset, set `"require_code_owner_review": true` in the `pull_request` rule.
4.  Close the exceptions. A classic rule does not apply to administrators unless you also select **Do not allow bypassing the above settings**, and in a ruleset every actor on the bypass list can merge without an owner's approval. Keep that list narrow, as the [bypass list guide](/learn/ruleset-bypass-list/) describes.
5.  Tell authors where to find the owner of a file before opening a pull request: the docs note that hovering the shield icon on a file shows who owns it and from which line.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Audit CODEOWNERS errors before you require code owner review](/learn/codeowners-errors-before-requiring-review/)
    
    Code review The Proofline team November 23, 2026 5 min read
    
-   ### [Why an approval from a reviewer without write access does not count](/learn/approvals-from-reviewers-without-write-access/)
    
    Code review The Proofline team November 23, 2026 4 min read
