docs/contributing/contribution-workflow.md
The contribution workflow for the Thunderbird for Android project explains the process of contributing code, from finding an issue to getting your pull request merged.
- [ ] Find an issue (or open a bug report)
- [ ] Fork β clone β add upstream remote
- [ ] Create a descriptive branch from `main`
- [ ] Make focused changes + update docs/tests
- [ ] Run `./gradlew check` locally (matches CI)
- [ ] Commit with Conventional Commits (Fix: #123)
- [ ] Push branch to your fork
- [ ] Open a pull request with description/screenshots
- [ ] Respond to review feedback β update branch
- [ ] Once merged: delete branch, sync fork, celebrate π
Before starting work, find an appropriate issue to work on:
We donβt track new ideas or feature requests in GitHub Issues. Mozilla connect is where feature proposals, product decisions, and larger design conversations happen.
If youβve found a bug thatβs not yet tracked:
Before coding:
To contribute code, you'll need to work with your own fork of the repository:
After forking, clone your fork to your local machine:
# Clone your fork
git clone https://github.com/YOUR-USERNAME/thunderbird-android.git
# Navigate to the project directory
cd thunderbird-android
# Add the upstream repository as a remote to your fork
git remote add upstream https://github.com/thunderbird/thunderbird-android.git
Replace YOUR-USERNAME with your GitHub username.
Always create a new branch from the latest main:
# Ensure you're on the main branch
git checkout main
# Pull latest changes
git pull upstream main
# Create a new branch
git checkout -b fix-issue-123
Use a descriptive branch name that reflects the issue you're addressing, such as:
fix-issue-123add-feature-xyzimprove-performance-abcWhen making changes:
Example of a good commit message:
fix(email): add validation for email input
Add regex pattern for email validation.
Display error message for invalid emails.
Add unit tests for validation logic.
Fixes #123
Before submitting your changes:
Run the existing tests to ensure you haven't broken anything:
./gradlew test
Write new tests for your changes:
Ensure all tests pass:
./gradlew check
Run lint checks to ensure code quality:
./gradlew lint
For more detailed information about testing, see the Testing Guide.
Once your changes are ready:
# Push your branch to your fork
git push origin your-branch-name
If you rebased:
git push --force-with-lease origin your-branch-name
To submit your changes for review:
thunderbird/thunderbird-androidmainWrite a clear and concise description for your pull request:
Example:
## Title
fix(email): add validation for email input
## Description
Fixes #123
This PR adds email validation to the login form. It:
- Implements regex-based validation for email inputs
- Shows error messages for invalid emails
- Adds unit tests for the validation logic
## Screenshots
[Screenshot of error message]
## Testing
1. Enter an invalid email (e.g., "test@")
2. Verify that an error message appears
3. Enter a valid email
4. Verify that the error message disappears
After submitting your pull request:
π For expectations and etiquette, see Code Review Guide.
To keep your fork in sync with the main repository:
# Fetch changes from the upstream repository
git fetch upstream
# Checkout your local main branch
git checkout main
# Merge changes from upstream/main into your local main branch
git merge upstream/main
# Push the updated main branch to your fork
git push origin main
If you're working on a branch and need to update it with the latest changes from main:
# Checkout your branch
git checkout your-branch-name
# Rebase your branch on the latest upstream main
git rebase upstream/main
# Force push the updated branch to your fork
git push --force-with-lease origin your-branch-name
Most pull requests go through several rounds of feedback and changes:
After your pull request is merged:
Delete your branch on GitHub.
Update your local repository:
git checkout main
git pull upstream main
git push origin main
Delete your local branch:
git branch -d your-branch-name
Celebrate your contribution! π
If your branch has conflicts with the main branch:
git fetch upstream
git checkout fix-issue-123
git rebase upstream/main
# resolve conflicts, then
git add .
git rebase --continue
git push --force-with-lease origin fix-issue-123
If continuous integration checks fail:
π See Code review guide for more details.