How To Contribute Code To Firefoxď
The whole process can be a bit long, and it might take time to get things right. If at any point you are stuck, please donât hesitate to ask at https://chat.mozilla.org in the #introduction channel. Additionally, here are some etiquette tips to help when reaching out:
Please donât ask to ask a question, post your question with the relevant context and someone will be able to help when they have time.
Use public facing channels to ask your questions instead of direct messaging folks.
Other people get to learn from your question and thereâs a higher chance your question will get answered quickly since there are many people in the #introduction room.
Your question may not be answered immediately, this is expected! If you are not getting feedback after an hour or so, feel free to repost the question.
Sometimes messages get skimmed over or notifications are lost in the sea of other things, so itâs normal to repost your question in this case.
Please search through the recent scrollback of your relevant channels to see if your question has been asked and/or answered already.
Most issues with setup have been experienced before, so thereâs a good possibility that your question has already been answered recently.
We make changes to Firefox by writing patches, testing them and pushing them into âthe treeâ, the term we use for all the code in the firefox repository. Letâs get started.
Please see the Firefox Contributors Quick Reference for simple check list.
Finding something to work onď
Bugs listed as âAssignedâ are not usually a good place to start, unless youâre sure you have something worthy to contribute. Someone else is already working on it!
Even with no assignee, it is polite to check if someone has recently commented that theyâre looking at fixing the issue.
Once you have found something to work on, go ahead and comment! Let the bug submitter, reviewer, and component owner know that youâd like to work on the bug. You might receive some extra information, and be made the assignee.
Find a bug weâve identified as a good fit for new contributorsď
With millions of bugs filed in Bugzilla, it can be hard to know where to start, so weâve created these bug categories to make getting involved a little easier:
Codetribute - our site for finding bugs that are mentored, some are good first bugs, some are slightly harder. Your mentor will help guide you with the bug fix and through the submission and landing process.
Good First Bugs - are the best way to take your first steps into the Mozilla ecosystem. Theyâre all about small changes, sometimes as little as a few lines, but theyâre a great way to learn about setting up your development environment, navigating Bugzilla, and making contributions to the Mozilla codebase.
Student Projects - are larger projects, such as might be suitable for a university student for credit. Of course, if you are not a student, feel free to fix one of these bugs. See our project list.
Fix that one bugď
If thereâs one particular bug youâd like to fix about Firefox, Thunderbird, or your other favorite Mozilla application, this can be a great place to start. There are a number of ways to do this:
Search bugzilla for relevant keywords. See pages on Bugzilla and Searching Bugzilla for further help
Learn the bugzilla component, with which your pet bug is implemented, using the components list. Browse this component on bugzilla for related bugs
Fixing your bugď
We leave this in your hands. Here are some further resources to help:
Our reviewer checklist is very useful, if you have a patch near completion, and seek a favorable review
Utilize our build tool Mach, its linting, static analysis, and other code checking features
Getting your code reviewedď
Once you fix the bug, you can advance to having your code reviewed. Mozilla uses Phabricator for code review.
If you have a mentored bug, ask your mentor first: they will review the
patch, or can easily find out who should. Otherwise, see
Getting reviews for how to pick a reviewer or a review group, the
r= commit message syntax, and what to do when a review is not
happening.
Following up and respondingď
For most new contributors, and even for long-time Mozillians, the first review of your patch will be âRequested Changesâ (or an âr-â in Bugzilla). This does not mean youâve done bad work. There is more work to do before the code can be merged into the tree. Your patch may need some changes - perhaps minor, perhaps major - and your reviewer will give you some guidance on what needs to be done next.
This is an important process, so donât be discouraged! With our long-lived codebase, and hundreds of millions of users, the care and attention helping contributors bring good patches is the cornerstone of the Mozilla project. Make any changes your reviewer seeks; if youâre unsure how, be sure to ask!
See Addressing review comments for how to update and resubmit your patch.
Getting code into Firefoxď
Once your patch has been accepted, it is ready to go. Before it can be merged into the tree, your patch will need to complete a successful run through our try server, making sure there are no unexpected regressions. If you donât have try server access already, your mentor, or the person who reviewed your patch, will be able to help.
Ask the reviewer to land the patch for you. For more details, see To push a change in the code base
Do it all againď
Thank you. Youâve fixed your very first bug, and the Open Web is stronger for it. But donât stop now.
There is plenty more to do. Your mentor might suggest a new bug for you to work on, or you can find one that interests you.
As you fix more bugs, you can request more access to Mozilla infrastructure so you can push to try and eventually land your own code. See Levelling up.