On the Home tab, navigate to Your craftspace → Repositories.
Select the .sourcecraft repository.
Under Code on the repository page, go to Overview.
Select the branch for editing.
Above the list of files in the branch, click .
Select File.
In the window that opens, enter .sourcecraft/review.yaml for the file name and click Create file.
In the .sourcecraft/review.yaml file, describe the approval rules as follows:
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 reviewersdisable_trust:true# Prohibit the _Trust_ resolution for pull requestsrules:-patterns:-"**"# Repository path patternreviewers: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
Tip
For group filtering, we recommend to use the ** pattern because the simple * pattern will not give you a match in expressions with /.
The syntax of organization-level settings is identical to that of repository-level settings.
Under patterns, specify the repository paths for your approval rules as follows:
"**": Apply the rule to the entire repository.
"src/**": Apply the rule only to the src directory.
"!docs/**": Do not apply the rule to the docs directory.
You can list multiple patterns one by one, like this:
-patterns:-"**"-"!docs/**"
This way, the rule will apply to any changes in your repository except those in the docs directory.
Tip
When using multiple patterns, list the "**" pattern first.
In the top-right corner, click Commit changes.
In the window that opens, configure the procedure for changes:
In the Commit message field, give a comment that will describe the changes you make.
Under Commit branch, select the default main branch.
Before confirming your first SSH connection, verify the server’s key fingerprint. This helps you detect server spoofing. If the fingerprints mismatch, cancel the connection and contact support.
Example of a command for cloning a repository with SourceCraft documentation
Create the .sourcecraft/review.yaml file with the approval rule configuration:
nano .sourcecraft/review.yaml
Use the following file structure:
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 reviewersdisable_trust:true# Prohibit the _Trust_ resolution for pull requestsrules:-patterns:-"**"# Repository path patternreviewers: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
Tip
For group filtering, we recommend to use the ** pattern because the simple * pattern will not give you a match in expressions with /.
The syntax of organization-level settings is identical to that of repository-level settings.
Under patterns, specify the repository paths for your approval rules as follows:
"**": Apply the rule to the entire repository.
"src/**": Apply the rule only to the src directory.
"!docs/**": Do not apply the rule to the docs directory.
You can list multiple patterns one by one, like this:
-patterns:-"**"-"!docs/**"
This way, the rule will apply to any changes in your repository except those in the docs directory.
Tip
When using multiple patterns, list the "**" pattern first.
Add the configuration file to the git index, commit, and push the changes to the default main branch:
Before confirming your first SSH connection, verify the server’s key fingerprint. This helps you detect server spoofing. If the fingerprints mismatch, cancel the connection and contact support.
Example of a command for cloning a repository with SourceCraft documentation