-
Notifications
You must be signed in to change notification settings - Fork 158
Contributing
Want to make code changes to PageSpeed? Interested in how it works internally? A good first step is to subscribe to pagespeed-dev. This is a place to ask technical questions about how PageSpeed works, follow development discussions, and propose changes you'd like to make.
Most of the code is in the mod_pagespeed repo, with nginx-specific code in the ngx_pagespeed repo. For any code changes you'll need to build mod_pagespeed from source and then if your change might touch nginx you'll need to follow additional steps.
If you have something that's been bothering you, go ahead and try fixing it. If you'd like to help out and are wondering what's urgent, either pick something from the top of our priorities list or post to pagespeed-dev and describe the sort of thing you'd like to work on.
Make changes to your copy of the repo in a branch labeled yourname-description
(ex: jefftk-blocking-rewrite
). As the upstream branch changes, rebase
your branch off of it. is means you'll have to force-push (git push -f
) but that's safe to do on your own branches. Just don't force-push to master
.
When writing code, we follow the Google C++ style guide. (The linter might be helpful.) If this is your first change and that seems overwhelming, don't worry about it! We can clean up style issues when we get to reviewing the change. Run the tests as you go to make sure you haven't broken things, and in general if you change functionality you should add a test that fails when runs without your change.
When you have something ready to merge to master
create a pull request and post on pagespeed-dev so we can review it. If this is your first change a "contributor license agreement" (CLA) bot will show up and ask you to sign the CLA. Then there will be comments and suggestions from other contributors, you'll probably need to make some changes, and eventually you'll get an LGTM ("looks good to me") on your change. At that point a Googler will run some additional internal tests, squash the branch into a single commit, and merge your change.
If any of this is confusing ask on pagespeed-dev or just go ahead and create a pull request; we'll figure things out then.