Skip to content

Code Review in Github#

Before merging code into master, you must request code review from another team member.

  1. Request review by a team member.
  2. Reviewer approves or rejects changes in Github.
  3. Reviewer can approve changes, which turns the merge button green.
  4. Reviewer can reject changes and add comments for things that need to be changed.
  5. Follow the next step based on whether changes were accepted or rejected.

If Changes are Accepted (Approved Pull Request)#

  1. Comment on the pull request in Github and approve.
  2. See Deploy to Production for next steps.

If Changes are Requested During Review#

Only do this process if the reviewer flagged issues that need to be addressed before merging.

  1. If the branch is already on your local, check it out:
    git checkout feature/[branch-name]
  2. If the branch was created by someone else:
  3. First, fetch code:
    git fetch --all
  4. Second, check out the feature branch:
    git checkout feature/[branch-name]
  5. Last, pull code:
    git pull origin feature/[branch-name]
  6. Import config to get environment back to state of those features:
    ddev drush cim OR lando drush cim
  7. Fix issues and commit your changes.
  8. If there are configurations that don’t belong, just don’t add to the commit.
  9. You can rm untracked files or checkout -- the configs you didn't need.
  10. Export config:
    ddev drush cex OR lando drush cex
  11. Push your changes back up to the feature branch:
    git push origin feature/[branch-name] -f
  12. Once the build process is complete, request review of changes again.
  13. Once changes are approved, follow steps above for an approved pull request.