Pull Requests and Code Review

Purpose

  1. Merging good quality code into the master branch

  2. Encourage a consistent approach to coding

  3. 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

Document ideal python dev environment