Configuring Your Droid YAML
Learn how to customize Droid behavior using the .droid.yaml file
The .droid.yaml
file at the root of your project allows you to customize Droid behavior through a simple YAML configuration. This powerful tool enables you to tailor Factory’s AI-driven assistance to your specific needs.
We are constantly adding new options to configure Droid through the .droid.yaml. Your feedback helps us prioritize which options we make available first.
Basic Structure
Here’s an overview of the .droid.yaml
structure:
Let’s dive into each section in detail.
Cloud Execution
The cloud_execution
section configures how Droid runs tests and validations in Cloud Droid Environments (CDE).
Test Configuration
path_filters
: File patterns to include for unit test execution. Uses fnmatch notation. Patterns beginning with!
are excluded.devcontainer
: Path to a devcontainer.json for the test environment. Takes precedence overdockerfile
if both are provided.dockerfile
: Path to a Dockerfile for the test environment. Ignored ifdevcontainer
is provided.unit_test_command
: Command to run unit tests. Use$file
to denote the test file path. Output should be in JUnit XML format.code_coverage_command
: Command to generate code coverage reports.
Validation Configuration
path_filters
: File patterns to include for linting and formatting.devcontainer
: Path to the devcontainer.json for the validation environment.dockerfile
: Path to a Dockerfile for the validation environment. Ignored ifdevcontainer
is provided.
Review Settings
The review
section configures how Droid performs code reviews.
Guidelines
path
: An fnmatch pattern specifying which files the guideline applies to.guideline
: The specific instruction for Droid to follow during reviews.
Auto-Review Settings
enabled
: Enable automatic code review on pull request open (default: true).draft
: Enable automatic code review on draft pull requests (default: false).bot
: Enable automatic code review on pull requests authored by bots (default: false).ignore_title_keywords
: Skip review for pull requests with these keywords in the title.ignore_labels
: Skip review for pull requests with these labels.excluded_base_branches
: Skip review for pull requests on these base branches.
Other Review Settings
pr_summary
: Generate a summary of the pull request (default: true).file_summaries
: Generate summaries of modified files (default: true).tips
: Include Droid Tips in the review (default: true).github_action_repair
: Suggest solutions to GitHub Action failures (default: true).path_filters
: Patterns to include/exclude for review. Use cautiously.enable_skip_reason_comments
: Add comments explaining why Droid skipped a review.
Test Generation Settings
path_filters
: Patterns to include/exclude for test generation.path_instructions
: Custom instructions for test generation based on file paths.
Validation
If you have access to Review Droid, it will automatically verify your .droid.yaml
when modified in a pull request. Otherwise, use a YAML validation tool to ensure valid YAML syntax.
Review Droid Guidelines
Learn how to set up effective guidelines for Review Droid