Table of contents
- How can you contribute?
- Getting started
How can you contribute?
Brave welcomes contributions of all kinds! You can make a huge impact without writing a single line of code
Help triage issues
One of the easiest ways to help is to look through our issues tab
- Does the issue still happen? Sometimes we fix the problem and don't always close the issue
- Are there clear steps to reproduce the issue? If not, let's find and document some
- Is the issue a duplicate? If so, share the issue that is being duplicated in the conversation
- See our Triage Guidelines page for more info about this process
- Making sure issues that are fixed have the appropriate milestone set. There may be pull requests fixing the bug on the different product channels and sometimes the issues are forgotten about (and aren't updated)
Documentation is extremely important. There are lots of areas we can improve:
- Having more clear or up-to-date instructions in the README for both
- Capturing/updating helpful information in our wiki. You'll need to reach out to a Brave team member to request permission - you can do this by creating a new issue or tagging a Brave team member in an existing issue.
- Helping to propose a way to bring documentation to other languages. Right now, everything is in English
- Improving this document
Help with translations
All text being added to Brave is done initially in English (en-US) and then is translated by real people into other languages. We're missing translations for many languages and some translations might be incomplete or poor quality.
For everything you'd need to get started, check out https://www.transifex.com/brave/brave/
Work on the code
- The repo's wiki has instructions for cloning the repo and getting setup on your platform of choice
- Check out the troubleshooting page if you get stuck
- Once you're up and running, find an interesting issue to fix. Check out issues labelled with good first issue
- other issues may require C++ changes in either the Brave code or in Chromium
- Make sure you have a GitHub account.
- Submit a ticket for your issue if one does not already exist. Please include the Brave version, operating system, and steps to reproduce the issue.
- Fork the repository on GitHub (this might be
brave-core, or both).
- For C++ changes, you can consider setting up clang-format for your editor.
- For changes which involve patches, please check out our Patching Chromium guide.
Once you've cloned the repo to your computer, you're ready to start making edits!
Please note that there are two repositories here:
- the root project (this repo,
brave-browser), which pulls down all of the Chromium code into
brave-coreis basically a sub-module (repo in a repo) which is located on disk under the root at
Depending on which you're editing, you'll need to add your fork to the remotes list. By default,
origin is set to upstream.
For example, here's how GitHub user
bsclifton would add BOTH remotes
# root where project is cloned cd ~/brave-browser/ git remote add bsclifton email@example.com:bsclifton/brave-browser.git git fetch bsclifton # root for the `brave-core` repo cd src/brave git remote add bsclifton firstname.lastname@example.org:bsclifton/brave-core.git git fetch bsclifton
Once you're setup, there's a few tips we can suggest:
- Make a new branch for your work. It helps to have a descriptive name, like
- Make commits in logical units. If needed, run
git rebase -ito squash commits before opening a pull request.
- New features and most other pull requests require a new test to be written before the pull request will be accepted. Some exceptions would be a tweak to an area of code that doesn't have tests yet, text changes, build config changes, things that can't be tested due to test suite limitations, etc.
- Use GitHub auto-closing keywords in the commit message, and make the commit message body as descriptive as necessary. Ex:
Add contributing guide This is a first pass at a contributor's guide so now people will know how to get pull requests accepted faster. Fix https://github.com/brave/brave-browser/issues/108
- Run the tests by running
npm run test brave_unit_testsand
npm run test brave_browser_tests
npm run test-unit
Keeping your fork up to sync
brave-coreclone themselves with the remote
originbeing upstream, so you can update either using
originis fetched, you can rebase your
git fetch origin git fetch bsclifton git checkout -b fork_master bsclifton/master git rebase origin/master git push bsclifton fork_master:master
An easier strategy might be to keep
origin in sync and then create branches based on that (and push those to your fork).
After the changes are made in your branch, you're ready to submit a patch. Patches on GitHub are submitted in the format of a pull request.
Considerations before submitting a pull request
Some helpful things to consider before submitting your work
- Did you manually test your new change?
- Does your pull request fix multiple issues? If so, you may consider breaking into separate pull requests.
- If you made a design or layout change, was there a mock-up provided? Do your changes match it?
- If your change affects session or preferences, did you include steps to test? You may also consider manually testing an upgrade.
Each pull request should include
- a descriptive title; this gets used in the release notes
- a short summary of the changes
- a reference to the issue that it fixes
- steps to test the fix (if applicable)
- for design-related changes, it is helpful to include screenshots
Once you submit a pull request, you should tag reviewers and add labels if needed. If you do not have the necessary GitHub permissions to do so, a Brave member will take care of this for you.
- Ensure the owner is tagged using the
- Ensure at least one other employee or contributor is tagged using the
- Go through the checklist that's provided in the pull request template and check the appropriate boxes
- Issues should be assigned the milestone when the PR is merged (and the fix is landed in Nightly aka master).
- Some issues may need to be uplifted to other channels (Dev / Beta / Release). Please see our notes on uplifting a pull request.
- If an issue is closed without a fix, because it was a duplicate, or perhaps it was invalid, then any milestone markers should be removed.
- If a bug is not fully fixed after its issue is closed, open a new issue instead of re-opening the existing one (unless the code has been reverted).
- Invalid bugs should be closed, tagged with invalid, or a comment should be added indicating that they should if you do not have permission.
- Asking for more detail in an issue when it is needed is helpful.
- Adding applicable labels to an issue is helpful.
- Adding and finding duplicates, and linking them together is helpful.
- Creating tracking issues for an area of work with multiple related issues is helpful.
- Calling out things which seem important for extra attention is helpful.
- Improving steps to reproduce is helpful.
- Testing and adding a comment with "Could not reproduce" if an issue seems obscure is helpful.
- Testing open pull requests.
- You can be granted write permission if you've helped a lot with triage by pinging @bbondy, @bsclifton, @kjozwiak, or another Brave team member.
- Helping make sure issues have a clear and understandable name (ex: not something like "Brave is broken").
- The first comment in an issue ideally would have a clear description of the issue and describe the impact to users. Asking folks for screenshots, steps to reproduce, and more information is highly recommended so that the issue is as clear as possible.
- If the issue is a duplicate, please let the issue creator know in a polite way how they can follow and track progress of the parent issue (including an ETA if it's marked with a milestone).