Skip to content

Add CODEOWNERS for review teams - #60518

Draft
mattcarrollcode wants to merge 1 commit into
mainfrom
add-codeowners
Draft

mattcarrollcode wants to merge 1 commit into
mainfrom
add-codeowners

Conversation

@mattcarrollcode

Copy link
Copy Markdown

Summary:

Adds .github/CODEOWNERS so a pull request asks for review from the team that owns the files it changes. Anything without a narrower rule falls back to @react/native-maintainers, which also owns this file.

GitHub uses the last matching rule, so the narrower folders (renderer, codegen and DevTools paths inside ReactCommon, Libraries, src and React, and the platform folders of the test apps) come after the broader paths they sit in. Hand-written .d.ts files are listed at types_DEPRECATED/, where #57513 moved them.

This stays a draft until the teams exist:

  • Create the 10 @react/native-* teams as visible teams, each with Write access to this repo. GitHub does not request review from a team that is missing, secret, or lacks write access.
  • To make code-owner approval required, turn on "Require review from Code Owners" in the main branch protection. Today main requires one approval with code-owner review off.

Changelog:

[INTERNAL] [ADDED] - Add CODEOWNERS for review teams

Test Plan:

Checked the file against main at 2c31df8 with a script that applies last-match-wins to all 8,483 tracked files:

  • every rule matches at least one file, and every rule still owns files after the rules below it
  • no broader rule comes after a narrower one
  • files per owner: android 1514, devtools 1286, js-api 1135, maintainers 992, renderer 947, testing 824, apple 558, modules-codegen 503, runtime 433, build-release 291

Once the teams exist, the CODEOWNERS file view on GitHub should show no errors.

Adds .github/CODEOWNERS so a pull request asks for review from the team
that owns the files it changes. Anything without a narrower rule falls
back to @react/native-maintainers, which also owns this file.

Signed-off-by: Matt Carroll <mattca@fb.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant