6. Code Review - odoo-ps/pshk-process GitHub Wiki

Responsible: TC
Responsibility: Clean up the code together with reviewer, merge to target branch Next Stage: Functional Testing

General

Code review is meant to make sure that code becomes more reliable before letting the client validate the development.
Always squash all commits to only one commit to push for commit.

Before Creating PR

Before creating PR, go through the code once more and clean up the code. Here are some guides:

  1. Remove unnecessary comments or lines of code
  2. Look through the manifest file and fill in in necessary information
  3. Edit/Create README file and put the summary of your development there.
  4. Look through program flows that can be optimized.

Creating PR

Create a Pull Request to one of the testing branch. For Saas, it should be {version_no}-{company_name}-test. For SH, take any of the staging branch.

https://github.com/odoo-ps/pshk-process/blob/master/img/CodeReview/create_pr.png

Make sure to add reviewer: pshk-quickstart-reviewer

Reviews

When the code is deemed good enough for the reviewer, PR will be approved. Do rebase and merge instead.
https://github.com/odoo-ps/pshk-process/blob/master/img/CodeReview/rebase_and_merge.png
If you're in Saas Custo, delete your branch once it's rebase and merged. No need to delete branch for SH.

When the reviewer asks you for some changes, adjust your code according to the reviewer's comments. After adjustment, amend commit by doing:

git commit --amend -a
git puh origin HEAD --force

Then ask for another review. Do this until the reviewer finally approve your changes.