This guide outlines the process and requirements for submitting pull requests to the Directus project.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/directus/directus/llms.txt
Use this file to discover all available pages before exploring further.
Before You Submit
Before creating a pull request, ensure:- You’ve searched for existing issues and PRs to avoid duplicates
- Your development environment is properly set up
- You understand the codebase structure
- Your changes align with Directus project goals
Code Quality Requirements
IMPORTANT: Before creating a pull request, ensure all linters and formatters pass successfully. This is a mandatory requirement for all PRs.Running Quality Checks
Run these commands to verify code quality:Auto-fixing Issues
Many issues can be automatically fixed:Creating a Changeset
All code changes require a changeset to document what changed for the release notes.Generate a Changeset
Run the changeset command:- Ask which packages are affected
- Ask whether the change is a major, minor, or patch
- Prompt for a description of the change
Changeset Format
IMPORTANT: All changeset descriptions must be written in past tense. Examples:- ✅ “Added support for multi-provider AI”
- ✅ “Fixed race condition in WebSocket connections”
- ✅ “Replaced deprecated
ldapjswithldapts” - ❌ “Add support for multi-provider AI” (incorrect)
- ❌ “Adding support for multi-provider AI” (incorrect)
Versioning
Follow semantic versioning:- Patch (
0.0.x) - Bug fixes, dependency updates, internal improvements - Minor (
0.x.0) - New features, enhancements, non-breaking changes - Major (
x.0.0) - Breaking changes requiring user action
- What changed (past tense)
- Why it changed (if not obvious)
- Migration steps or what users need to update
Pull Request Template
When creating a pull request, use the provided template. Replace the placeholder “Lorem ipsum” content with actual details about your changes.Template Sections
Scope
List what changed in the PR:Potential Risks / Drawbacks
Document any risks or trade-offs:Tested Scenarios
Describe how the changes were tested:Review Notes / Questions
Highlight areas needing attention or questions for reviewers:Checklist
Confirm the following:Related Issue
Always reference the related issue at the bottom usingFixes #<num> format:
Testing Requirements
Ensure your changes are thoroughly tested:Unit Tests
Blackbox/E2E Tests
For significant changes, run blackbox tests:Test Coverage
- Add tests for new functionality
- Update tests for modified functionality
- Ensure tests pass across all supported databases when applicable
- Follow existing test patterns and conventions
Branch Naming
Use descriptive branch names:fix/issue-description- Bug fixesfeat/feature-description- New featuresrefactor/description- Code refactoringdocs/description- Documentation changestest/description- Test additions or updates
fix/websocket-connection-errorfeat/oauth-authenticationrefactor/service-layer-cleanup
Commit Messages
Write clear, descriptive commit messages:- Use present tense (“Add feature” not “Added feature”)
- Be concise but descriptive
- Reference issue numbers when applicable
Handling Change Requests
For Human Contributors
Push commits directly to your PR branch as usual. Address reviewer feedback by:- Making the requested changes
- Running quality checks
- Pushing new commits to your branch
- Responding to review comments
For AI Agents Only
This section applies only to AI coding agents. Human contributors should follow the process above.
- Allows reviewers to evaluate AI-generated changes in isolation
- Maintains clear separation between original work and revisions
- Enables easier rollback if AI-generated fixes introduce issues
- Provides an additional review checkpoint for AI changes
Review Process
After submitting your PR:- Automated checks - CI/CD runs linting, tests, and builds
- Code review - Maintainers review your changes
- Feedback - Address any requested changes
- Approval - Once approved, your PR will be merged
What Reviewers Look For
- Code quality and adherence to style guidelines
- Comprehensive test coverage
- Clear and accurate changeset
- Proper documentation (if applicable)
- No breaking changes without proper justification
- Performance implications
- Security considerations
Common Issues
Merge Conflicts
If your PR has merge conflicts:Failed CI Checks
If CI checks fail:- Review the error logs in the GitHub Actions tab
- Fix the issues locally
- Run the checks locally before pushing:
- Push your fixes
Missing Changeset
If you forgot to add a changeset:Documentation and OpenAPI
For changes that affect:- User-facing features - Create a documentation PR at directus/docs
- API endpoints - Create an OpenAPI package PR at directus/openapi
Tips for Success
- Start small - Begin with smaller contributions to get familiar with the process
- Ask questions - Don’t hesitate to ask for clarification in discussions
- Be patient - Reviews may take time, especially for large changes
- Stay responsive - Respond promptly to review feedback
- Follow conventions - Adhere to existing code patterns and styles
- Test thoroughly - Ensure your changes work across different scenarios
- Update documentation - Keep docs in sync with code changes
Getting Help
If you need assistance:- Comment on the related issue
- Ask in GitHub Discussions
- Join the Directus Discord
- Review existing PRs for examples