Skip to main content
This guide walks you through the process of creating, submitting, and getting your pull requests merged into CVAT.

Before You Start

1. Discuss Your Changes

Before starting significant work:
  • Open an issue or comment on an existing one to discuss your proposed changes
  • Get feedback from maintainers about your approach
  • Ensure your changes align with project goals
  • Avoid duplication of effort
This helps ensure your contribution will be accepted and saves everyone time.

2. Set Up Your Environment

Make sure you have:

Creating a Pull Request

Step 1: Create a Branch

Create a feature branch from develop:
Branch naming conventions:
  • feature/description - New features
  • fix/description - Bug fixes
  • refactor/description - Code refactoring
  • docs/description - Documentation changes

Step 2: Make Your Changes

Follow these guidelines:
  1. Write clean code: Follow the code style guidelines
  2. Keep commits focused: Each commit should represent a logical change
  3. Write good commit messages: See examples below
  4. Add tests: Cover your changes with appropriate tests
  5. Update documentation: If your changes affect user-facing features

Step 3: Test Your Changes

Before submitting, ensure:
See the testing guide for more details.

Step 4: Create Changelog Fragment

CVAT uses scriv for changelog management. Create a changelog fragment:
This creates a new file in changelog.d/ where you describe your changes:
Categories:
  • Added: New features
  • Changed: Changes to existing functionality
  • Deprecated: Features that will be removed
  • Removed: Features that were removed
  • Fixed: Bug fixes
  • Security: Security-related changes

Step 5: Commit Your Changes

Write clear, descriptive commit messages:
Good commit message format:

Step 6: Push to Your Fork

Step 7: Create Pull Request on GitHub

  1. Go to your fork on GitHub
  2. Click “Compare & pull request”
  3. Base branch: develop (not master!)
  4. Head branch: Your feature branch
  5. Fill out the PR template

Pull Request Template

When you create a PR, fill out this template:

Review Process

What Happens Next

  1. Automated checks run: CI/CD pipeline runs tests and linters
  2. Maintainers review: Core team reviews your code
  3. Feedback provided: You may receive comments and change requests
  4. You iterate: Address feedback and push updates
  5. Approval: Once approved, your PR will be merged

CI/CD Checks

Your PR must pass all automated checks:
  • Linters: ESLint, Pylint, Black, isort
  • Type checking: TypeScript, mypy
  • Tests: Unit, integration, E2E tests
  • Security: CodeQL analysis
  • Build: Docker images build successfully
If checks fail, review the logs and fix issues.

Code Review

Reviewers will check for:
  • Code quality: Readable, maintainable, follows style guidelines
  • Correctness: Logic is sound and bug-free
  • Tests: Adequate test coverage
  • Documentation: Changes are documented
  • Performance: No unnecessary performance degradation
  • Security: No security vulnerabilities introduced

Responding to Feedback

When you receive feedback:
  1. Be responsive: Reply to comments promptly
  2. Ask questions: If something is unclear, ask for clarification
  3. Make changes: Address the feedback in new commits
  4. Be respectful: Remember reviewers are helping improve your code
  5. Mark resolved: Mark conversations as resolved when addressed
Push updates:

Updating Your Branch

If develop has moved forward, you may need to update:
Alternatively, merge instead of rebase:

Pull Request Requirements

Your PR should:

Required

  • Target the develop branch
  • Pass all CI/CD checks
  • Include a changelog fragment
  • Have clear commit messages
  • Include tests for new functionality
  • Follow code style guidelines
  • Link to related issues
  • Have an approved review from a maintainer
  • Update documentation if needed
  • Add screenshots for UI changes
  • Include performance considerations
  • Address any security implications

Common Issues

CI Failures

Linter errors:
Test failures:
  • Run tests locally to reproduce
  • Check test logs in CI for details
  • Ensure your changes don’t break existing functionality
Build failures:
  • Check Docker build logs
  • Ensure all dependencies are installed
  • Verify Dockerfile syntax

Merge Conflicts

If your branch has conflicts with develop:

Stale Pull Requests

If your PR becomes stale:
  • Update your branch with latest develop
  • Address any new conflicts
  • Respond to pending review comments
  • Ping maintainers if needed

After Your PR is Merged

Clean Up

Celebrate! 🎉

Your contribution is now part of CVAT! Thank you for contributing.

What’s Next?

  • Look for more issues to work on
  • Help review other pull requests
  • Improve documentation
  • Join community discussions

Getting Help

If you need help with your PR:

Best Practices

Do:

  • Keep PRs focused and reasonably sized
  • Write clear descriptions and commit messages
  • Add tests for your changes
  • Update documentation when needed
  • Respond to reviews promptly
  • Be patient and respectful

Don’t:

  • Submit massive PRs that are hard to review
  • Make unrelated changes in the same PR
  • Push without running tests locally
  • Ignore review feedback
  • Force-push over others’ commits
  • Be discouraged by feedback

Resources

Thank you for contributing to CVAT! Your efforts help make CVAT better for everyone.