System code review with git tools

Sometimes it is necessary to leave feedback about the source code in the repository as a whole, for example, when accepting code for support from other developers or when connecting to a new project.


The review processes in Github and its analogs are built around the changes made, and in our case, comments need to be given to the state of the entire system code at the time of commenting.


How to do this using git itself: fix the state in the review branch, then leave your comments in the merge request for this branch.


In general, the essence of the method has already been stated, below are just a few details.


Issue


Imagine the situation: they give you a repository with the code and ask for your opinion on it. Usually in such cases, comments are made in a separate document / task / page in confluence, etc., which is not very convenient as:


  1. Comments may become obsolete during the writing process, as development may continue.
  2. It is difficult to refer to individual sections of the code; references like doubtful / bar.js: 4 are simply inconvenient for constantly switching between the document and the code.
  3. In isolation from the code, the document is lost with a rather high probability.

System code review method


, : , merge request .
https://github.com/oktend/system-review-example :


  1. ( dev):
    https://github.com/oktend/system-review-example/commit/0514531a35edf19e7032eb49f45a98d019f83efe
  2. , "system-review/1march2020-goodman":
    https://github.com/oktend/system-review-example/tree/system-review/1march2020-goodman
  3. , , "1march2020-goodman-issues":
    https://github.com/oktend/system-review-example/tree/system-review/1march2020-goodman-issues
  4. , , .
  5. merge request ( pull request) "system-review/1march2020-goodman-issues" -> "system-review/1march2020-goodman":
    https://github.com/oktend/system-review-example/pull/1/files

:
image
https://github.com/oktend/system-review-example/network



merge request , .
, .


:
https://github.com/oktend/system-review-example/blob/c80b03710059b235347ec781bf08dca9c0e68f7d/review-1march2020-goodman.md
:
https://github.com/oktend/system-review-example/blob/c80b03710059b235347ec781bf08dca9c0e68f7d/foo.js


- github ( ), IDE, git.


, .



I fully admit the possibility that I re-invented the bicycle and that there is a better method for such cases, then I will be grateful for pointing out the best way.


The idea for this method was not invented by me, but suggested by one developer, if Artem expresses a desire, I will indicate as the author.


All Articles