Before You Start
Before creating a pull request, make sure you’ve:Read the guidelines
Familiarize yourself with the contribution guidelines and code style rules.
Branch Naming Conventions
Use descriptive branch names that indicate the purpose of your changes:- Features
- Bug Fixes
- Refactoring
- Other
Commit Messages
Format
Write clear, descriptive commit messages:Types
- feat: New feature
- fix: Bug fix
- refactor: Code refactoring (no functional changes)
- perf: Performance improvements
- style: Code style changes (formatting, missing semicolons, etc.)
- test: Adding or updating tests
- docs: Documentation changes
- chore: Maintenance tasks (dependencies, build config, etc.)
Examples
Commit Standards
Creating a Pull Request
1. Push Your Branch
2. Open a Pull Request
Go to github.com/ProtonMail/WebClients and click “New Pull Request”.3. Fill Out the PR Template
Provide a clear description of your changes:- Title
- Description
- Checklist
Write a concise, descriptive title:
PR Requirements
Automated Checks
Your PR must pass all automated checks:Linting
ESLint must pass with zero warnings
Type Checking
TypeScript must compile without errors
Tests
All existing tests must pass
Build
Application must build successfully
The CI will automatically run these checks when you push commits or open a PR. Check the “Checks” tab on your PR for results.
Code Review
All pull requests require code review before merging:- Self-review first - Review your own changes before requesting review
- Request reviewers - Tag relevant team members or maintainers
- Address feedback - Respond to all review comments
- Resolve conversations - Mark conversations as resolved once addressed
MergeBot Integration
This repository uses MergeBot (.margebot.yml) for automated merging:
- PRs labeled with
state::Blockedwill not be auto-merged - CI failures will prevent merging (
ciFailFast: true) - Some team members can fast-track PRs through the review process
Updating Your PR
Responding to Feedback
Keeping Your Branch Updated
Ifmain has advanced since you created your branch:
PR Size Guidelines
- Small PRs (Ideal)
- Medium PRs
- Large PRs
Lines changed: < 300✅ Benefits:
- Faster to review
- Easier to understand
- Lower risk of bugs
- Quicker to merge
- Single bug fix
- Small feature addition
- Documentation update
- Dependency update
Common PR Issues
CI failing on ESLint
CI failing on ESLint
Make sure you’ve run linting locally:Fix all warnings and errors. Remember:
--max-warnings=0 is enforced.Type errors in CI
Type errors in CI
Run type checking locally:Fix all TypeScript errors before pushing.
Merge conflicts
Merge conflicts
Rebase your branch on the latest
main:Pre-commit hooks failing
Pre-commit hooks failing
The pre-commit hooks run:
- ESLint with
--fix - Prettier with
--write - Stylelint with
--fix
Test failures
Test failures
Run tests locally to debug:
After Your PR is Merged
PR Review Guidelines
For Reviewers
If you’re reviewing a PR:- What to Check
- How to Review
- Review Actions
- Code follows style guidelines
- Logic is clear and maintainable
- No unnecessary complexity
- Tests cover new functionality
- No security vulnerabilities
- Performance impact is acceptable
- Backwards compatibility maintained
- Documentation is updated
Resources
GitHub Issues
Browse existing issues or report new ones
Contribution Guidelines
General guidelines for contributing
Code Style Guide
Linting and formatting standards
Yarn Workspaces
Learn about monorepo management
Getting Help
- Questions
- PR Issues
- Bugs
Use the Ask a Question issue template for:
- Code-related questions
- Technical discussions
- Implementation advice
Thank you for contributing to Proton WebClients! Your efforts help make privacy and security accessible to everyone.