Code Owners are available on Enterprise plans
To set up Code Owners in your repository, you'll need to do the following:
- Set up Vercel's private npm registry to install the necessary packages
- Install and initialize Code Owners in your repository
- Add your repository to your Vercel dashboard
If you've already set up Boundaries or Conformance, you may have already completed some of these steps.
To enable Code Owners for your Enterprise team, you'll need to request access through your Vercel account administrator.
Note: Code Owners is available for Enterprise teams. To add it to your contract or upgrade to Enterprise, contact us
Vercel distributes packages with the
@vercel-private scope through our private npm registry, and requires that each user using the package authenticates through a Vercel account.
To use the private npm registry, you'll need to follow the documentation to:
- Set up your local environment – This should be completed by the team owner, but each member of your team will need to log in
- Set up Vercel – This should be completed by the team owner
- Set up Code Owners for use with CI – This should be completed by the team owner
A GitHub App enables Code Owners functionality by adding reviewers and enforcing review checks for merging PRs.
If you have an existing
CODEOWNERS file in your repository, you can use the CLI to automatically migrate your repository to use Vercel Code Owners. Otherwise, you can skip this step.
Start by running this command in your repository's root:
pnpm --package=@vercel-private/code-owners dlx vercel-code-owners init
After running, check the installation success by executing:
To install, you must be an organization owner or have the GitHub App Manager permissions.
- Go to https://github.com/apps/vercel/installations/new
- Choose your organization for the app installation.
- Select repositories for the app installation.
Installto complete the app installation in the chosen repositories.
After installation, define Code Owners files in your repository. Pull requests with changes in specified directories will automatically have reviewers added.
Start by adding a
.vercel.approvers file in a directory
in your repository. List GitHub usernames or team names in the
file, each on a new line:
Then, run the
validate command to check the syntax and merge your changes into your repository:
pnpm vercel-code-owners validate
.vercel.approvers file merged into the main branch, test the flow by modifying
any file within the same or child directory. Create a pull request as usual, and the system
will automatically add one of the listed users as a reviewer.
This step is optional
By default, GitHub checks are optional and won't block merging. To make the Code Owners
check mandatory, go to
Settings > Branches > [Edit] > Require status checks to pass before merging in your repository settings.