Code Review in Github#
Before merging code into master, you must request code review from another team member.
- Request review by a team member.
- Reviewer approves or rejects changes in Github.
- Reviewer can approve changes, which turns the merge button green.
- Reviewer can reject changes and add comments for things that need to be changed.
- Follow the next step based on whether changes were accepted or rejected.
If Changes are Accepted (Approved Pull Request)#
- Comment on the pull request in Github and approve.
- 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.
- If the branch is already on your local, check it out:
git checkout feature/[branch-name]
- If the branch was created by someone else:
- First, fetch code:
git fetch --all
- Second, check out the feature branch:
git checkout feature/[branch-name]
- Last, pull code:
git pull origin feature/[branch-name]
- Import config to get environment back to state of those features:
ddev drush cim
ORlando drush cim
- Fix issues and commit your changes.
- If there are configurations that don’t belong, just don’t add to the commit.
- You can rm untracked files or checkout -- the configs you didn't need.
- Export config:
ddev drush cex
ORlando drush cex
- Push your changes back up to the feature branch:
git push origin feature/[branch-name] -f
- Once the build process is complete, request review of changes again.
- Once changes are approved, follow steps above for an approved pull request.