Pull Requests and Code Review
Purpose
Merging good quality code into the master branch
Encourage a consistent approach to coding
Knowledge transfer and project status awareness
Code creation
Create a branch from master to make your change
ie. New feature, bug fix
git checkout -b features/demo/some-feature
Create!
Code in the new branch
Commit to the new branch often
Push changes to origin
When code is ready
Merge master to branch and resolve any conflicts
Commit and push to origin
Create a pull request to bring branch into master
Pull request
Create a pull request in DevOps for your branch
Assign at least one reviewer to look over your changes
This can’t be yourself!
Code review
The reviewer will comment and you will update
Repeat
The reviewer will approve your change
You will complete the pull request
Of note
Code changes to the master branch trigger CI/CD pipelines
Code should be tested and of high quality before it sees the master branch
Can create automated unit tests for python and apply them to feature branches
Choosing a linter can encourage best practices
Can we document the ideal python dev setup for our needs?
linter, venv, VSCode add extensions, etc.
Would apply to JavaScript as well, though smaller code base