Configuration Files
You can configure our tool using either TOML or YAML format. To do so, create a file namedzenable_config.toml or zenable_config.yaml in any directory of your repository.
TOML Example
YAML Example
Configuration Options
skip_filenames
List of additional filenames or glob patterns to skip. This field accepts a list (array) of patterns and works like gitignore, including support for negation patterns.A standard list of lock files will automatically be added to the beginning of your configuration.
- Exact filename matches (e.g.,
"package-lock.json") - Glob patterns (e.g.,
"**/*.rbi","foo/**/*.pyc") - Negation patterns with
!prefix (e.g.,"!keep-this.json")
Basic Glob Pattern Examples
Basic Glob Pattern Examples
*.log- Skip all log files in any directory**/*.tmp- Skip all .tmp files in any directory (recursive)src/**/*.test.js- Skip all .test.js files under src/ directorydocs/*.md- Skip markdown files directly in docs/ directorybuild/*- Skip all files directly in build/ directory**/node_modules/**- Skip all files in any node_modules directoryexample.py- Skip files named example.py in any directory**/example.tmp- Skip files named example.tmp in any directory (i.e. the same asexample.tmp)/example.py- Skip example.py only in the root directory
Negation Pattern Examples
Negation Pattern Examples
Negation patterns start with Skip all files in build/ except those in build/keep/Escaping files that literally start with !
! and allow you to include files that would otherwise be skipped. Order matters - the last matching pattern wins.Skip all log files except important.logTo skip files that literally start with
! (fairly rare), be sure to escape the exclamation mark appropriately:- TOML requires a double backslash
"\\!filename.txt" - YAML uses a single backslash
\!filename.txt
preflight
Preflight lets you optionally skip reviews based on static analysis findings.- enabled: Whether to enable preflight. (default: false)
- max_changed_lines: Maximum total changed lines allowed before skipping the review. (default: 2500)
Example: Enable preflight with a 500-line limit
Example: Enable preflight with a 500-line limit
pr_quality_filter
PR Quality Filter lets you optionally skip reviews based on the quality of the PR. We measure the PR quality based on analysis of the whole PR and the generated review. We measure multiple dimensions of quality, such as code quality, architecture quality, testing quality, documentation quality, security quality, and maintainability. This generates a final overall quality score for the PR, which is used to determine if the PR review will be sent or not. Skip reviews with quality score below the threshold can be a useful way to skip reviews on pr that are not fully done, and reduce the noise in your PRs.- enabled: Whether to enable pr_quality_filter. (default: false)
- quality_threshold: The minimum quality score required to post a review. Valid values are between 0 and 1. (default: 0.5)
Example: Enable pr_quality_filter with quality threshold
Example: Enable pr_quality_filter with quality threshold
skip_branches
List of branches to skip. You can use python regex to match the branch names. We will check all the patterns in the list, if any pattern match, the PR opened in that branch will be skipped.reactions
Configuration section for controlling which reactions are added during reviews. This allows you to enable or disable specific reactions that the reviewer generates.reactions.taking_a_look
Controls the “eyes” emoji reaction (👀) that is added at the start of a review. The reaction is automatically removed once the review is complete. Default:true (👀 reaction is added)
Examples:
Example: Disable the 'Taking a look' reaction
Example: Disable the 'Taking a look' reaction
Example: Explicitly enable the eyes reaction
Example: Explicitly enable the eyes reaction
comments
Configuration section for controlling which comments are posted during reviews. This allows you to enable or disable specific informational comments that the reviewer generates.comments.no_findings
When set totrue, posts the “Nice work! 😎” comment when no issues are found in the PR. Set to false to disable this comment - when disabled and there are no findings, no review comment will be posted at all.
Default: true (comment is posted)
These settings only affect informational comments. Reviews with actual findings or suggestions will always be posted regardless of these settings.
Example: Disable all informational reactions and comments
Example: Disable all informational reactions and comments
findings
Control the behavior for each comment in the PR review based on different labels. Each review comment is classified into one of the following labels:- Bug
- Readability
- Performance
- Complexity
- Security
- Inconsistency
- Accessibility
- Mistake
- Other
findings.<label>
For each label you can configure the behavior of the comment.findings.<label>.hide
Set totrue to hide all the comments with the specified label, false to show it.
Default: false (comment is posted)
Example: Hide all 'Bug' and 'Readability' comments
Example: Hide all 'Bug' and 'Readability' comments
Default Configuration
By default, all review reactions and comments are enabled:Troubleshooting
If you’re having issues with the GitHub or GitLab reviewers, try the following:-
Check that you only have one configuration file in your repository, either
zenable_config.tomlorzenable_config.yaml. If you have multiple in different directories, the reviewer will fail to load the configuration and will use the default configuration. - Check that the file is a valid TOML or YAML file and that the structure is correct.
- The skip_branches option uses python regex to match the branch names. Check that the regex is correct.
- If any of these solutions don’t work, you can contact our support team at support@zenable.io.