You specify the approval rule configuration for a particular repository and store it in the .sourcecraft/review.yaml file.
Warning
Support for storing configurations for CI/CD, approval rules, and branch policies in a single .src.ci.yaml file at the repository root will soon be discontinued. Use the separate .sourcecraft/ci.yaml, .sourcecraft/review.yaml, and .sourcecraft/branches.yaml files.
On the Home tab, navigate to Repositories and select a repository.
In the top-right corner, click Clone.
Depending on your connection method, copy the link for cloning the repository.
In the terminal, run this command:
git clone <link_for_cloning_repository>
Go to your cloned repository:
cd <repository_name>
Generate an approval rule configuration file named .sourcecraft/review.yaml, e.g.:
codereview:need_ships:1# Required number of approvals from reviewersignore_self_ship:false# Ignore approvals from the pull request authorignore_non_reviewers_block:false# Ignore pull request blocking from non-reviewersauto_assign:true# Automatically assign reviewersrules:-patterns:-'*'reviewers:usernames:-"<user_name>"# List of reviewersassign:1# Number of automatically assigned reviewersneed_ships:1# Required number of approvals from reviewersignore_self_ship:false# Ignore approvals from the pull request author