You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

QuakeCoRE Software Team has introduced code review policy as an effort for quality assurance and encourage increased interactions amongst team members.

Step-by-step guide

  1. DeveloperCreate a branch -> Edit -> Add/Commit/Push to the branch

    In the following, let's assume the developer "seb56" is making a small change to  "git_sim_pkg" repository.

    seb56@hypocentre /home/seb56/gm_sim_pkg :git checkout -b fix_hardcoded_python
    Switched to a new branch 'fix_hardcoded_python'

    https://www.atlassian.com/git/tutorials/using-branches


    Suppose the developer edited the file "setup_remote.sh.  The developer does "git add"  followed by "git commit".

    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git add setup_remote.sh
    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git commit -m "Replaced the hard-coded python path with a variable"
    [fix_hardcoded_python c2a7911] Replaced the hard-coded python path with a variable
     1 file changed, 2 insertions(+), 1 deletion(-)

    When the developer feels the code is ready, he/she does "git push" to the new branch.

    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git push origin fix_hardcoded_python
    Counting objects: 4, done.
    Delta compression using up to 32 threads.
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (4/4), 410 bytes | 0 bytes/s, done.
    Total 4 (delta 3), reused 0 (delta 0)
    remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
    To github.com:ucgmsim/gm_sim_pkg.git
     * [new branch]      fix_hardcoded_python -> fix_hardcoded_python
    
    
  2. Developer : Go to github repository and make a pull request. Specify a reviewer. The reviewer can be an expert or a team member who wishes to learn more about the code base.



    Enter the description of the code change and specify the reviewer. In this example, "dlagrava" is selected.



    Before clicking on "Create pull request", scroll down and have a good look at your code change. If you're happy, make a pull request.

    The developer will be presented with a page that looks like below.


  3. Reviewer : The reviewer receives an email requesting the review. He/she can view the code changes, and make an comment line by line. If the reviewer is happy with all the changes, he can "approve" the code.

  4. Admin (Reviewer) : The repository admin (most of the time, the reviewer will function as the admin) will "Merge the pull request".
  5. Developer : Remove the branch unless the branch needs to be kept.

 

https://help.github.com/articles/about-pull-requests/

https://help.github.com/articles/merging-a-pull-request/

 

 

  • No labels