Excluding Files, Folders, or Branches with Filters
Last updated
Last updated
Bito Inc. (c) 2024
The AI Code Review Agent offers powerful filters to exclude specific files and folders from code reviews and enables skipping automated reviews for selected Git branches. These filters can be configured at the Agent instance level, overriding the default behavior.
A list of files/folders that the AI Code Review Agent will not review if they are present in the diff. You can specify the files/folders to exclude from the review by name or glob/regex pattern. The Agent will automatically skip any files or folders that match the exclusion list.
This filter applies to both manual reviews initiated through the /review
command and automated reviews triggered via webhook.
By default, these files are excluded: *.xml
, *.json
, *.properties
, .gitignore
, *.yml
, *.md
Note:
Patterns are case sensitive.
Don’t use double quotes, single quotes or comma in the pattern.
Users can pass both types of patterns - Unix files system based glob pattern or regex.
Exclusion Rule for Files & Folders | Applicable Pattern | Matched Examples | Not Matched Examples |
---|---|---|---|
Exclude all properties files in all folders and subfolders |
|
|
|
Exclude all files, folders and subfolders in folder starting with |
|
|
|
Exclude all files, folders and subfolders in folder |
|
|
|
Exclude all files, folders and subfolders in subfolder |
|
|
|
Exclude non-css files from folder |
|
|
|
Exclude specific file |
|
|
|
Exclude non-css files from folder starting with |
|
|
|
Exclude all files & folders |
|
|
|
Exclude all files & folders starting with name |
|
|
|
Exclude single-character folder names |
|
|
|
Exclude all folders, subfolders and files in those folders except folder starting with |
|
|
|
Exclude all files in all folders except |
|
|
|
Exclude non-css files from folder |
|
|
|
This filter allows users to skip automated reviews for pull requests based on the source or target branch. It is useful in scenarios where automated reviews are unnecessary or could potentially disrupt the workflow.
For example, this filter is useful in scenarios such as:
Merging to upstream branches from development branches.
Pull requests from PoC/experiment branches.
Aggregated code changes moving towards the main branch.
This filter applies only to automatically triggered reviews. Users should still be able to trigger reviews manually via the /review
command.
By default, master
and main
branches are excluded.
Note:
Patterns are case sensitive.
Don’t use double quotes, single quotes or comma in the pattern.
Users can pass both types of patterns - Unix files system based glob pattern or regex.
Exclusion Rules for Branch | Pattern | Matched Examples | Not Matched Examples |
---|---|---|---|
Exclude any branch that starts with name |
|
|
|
Exclude any branch that does not start with |
|
|
|
Exclude any branch which is not |
|
|
|
Exclude branches like |
|
|
|
Exclude any branch ending with |
|
|
|
Exclude the branch that has keyword |
|
|
|
Exclude the branch named |
|
|
|
Exclude any branch name that does not start with |
|
|
|
Exclude branches with names containing digits |
|
|
|
Exclude branches with names ending with |
|
|
|
Exclude branches with names containing a specific substring |
|
|
|
Exclude branches with names containing exactly three characters |
|
|
|
Exclude branch names starting with |
|
|
|
Exclude all branches where name do not contains version like |
|
|
|
Exclude all branches which are not alphanumeric |
|
|
|
Exclude all branches which contains space |
|
|
|
A binary setting that enables/disables automated review of pull requests (PR) based on the draft status. Enter True
to disable automated review for draft pull requests, or False
to enable it.
The default value is True
which skips automated review of draft PR.
You can configure filters using the Agent configuration page. For detailed instructions, please refer to the Install/run Using Bito Cloud documentation page.
You can configure filters using the bito-cra.properties file. Check the options exclude_branches
, exclude_files
, and exclude_draft_pr
for more details.
You can configure filters using the GitHub Actions repository variables: EXCLUDE_BRANCHES
, EXCLUDE_FILES
, and EXCLUDE_DRAFT_PR
. For detailed instructions, please refer to the Install/Run via GitHub Actions documentation page.