Code Owners
Using the Code Owners feature on GitCode can help the project team ensure that key parts of the code are reviewed by the right and suitable people. The Code Owners feature allows you to specify "owners" for specific files or folders in your repository. These owners will be automatically requested to review the code when related files or folders are modified and a Pull Request is created. This article will guide you on how to set up and use the Code Owners feature in GitCode to improve the efficiency and quality of code reviews.
CODEOWNERS File
To enable the Code Owners feature, you first need to create a file named "CODEOWNERS" in your project repository. You can place this file in one of the following locations:
- Root directory of the repository
.gitcode/directorydocs/directory
Choose a location to create the file. GitCode checks these locations in the following order:
CODEOWNERSin the root directory of the repository..gitcode/CODEOWNERSdocs/CODEOWNERS
Creating the CODEOWNERS File
-
Open the corresponding repository, click the "+" button, and select "New File."

-
Select the save location, name the new file
CODEOWNERS, and click "Commit changes" to create the file.
-
Define the Code Owners rules in the file editor (see the rule definition section below).
