WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Contributing

Jeff Kaufman edited this page Dec 21, 2015 · 9 revisions

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.

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, follow the Google C++ style guide. 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.

Clone this wiki locally