Skip to content

Engineering

Evan Mattson edited this page Aug 19, 2020 · 5 revisions

Set up Site Kit project

  • Fork the repository (unless you have write access).
  • Ensure you are in the google-site-kit directory and run the following commands:
    • git checkout develop
    • composer install
    • npm install
    • npm run build
  • Ensure WP_DEBUG constant is set to true in your environment.

Submit code changes

  • Create a branch following the branching strategy guidelines.
  • Write your code, adhering to the guidelines below:
    • Backward-compatible with WordPress 4.7 and PHP 5.6
    • Adhere to project code standards (WPCS, ESLint etc.)
    • Apply DRY principal
    • Add tests
    • Easily understandable by other developers; readability is more important than cleverness or brevity
  • Submit a pull request to the develop branch.

Branching strategy

The branching strategy follows the GitFlow schema; make sure to familiarize yourself with it.

All branches are created off the develop branch and named with {type}/{issue_id}-{short_description}

  • {type} = issue Type label
  • {issue_id} = issue ID
  • {short_description} = short description of the PR

Code reviews

All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

Changelog messages

Changelog messages are written as part of the “Life of an issue” cycle and should comply to changelog message guidelines.

License agreement

Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.