Requesting code review for bulk files and projects

Last updated 2 months ago

In some circumstances, you may want specific parts of a git repository reviewed by the PullRequest network outside the context of a pull/merge request (ie - a collection of files or the entire repository).

The following steps outline the most secure way of creating a PullRequest review job within your version control hosting provider.


1. Check out the latest code locally for the repository that you want reviewed

2. cd into your repository's local checkout.

cd my_repo

3. Delete visible files/folders within this directory.

Make sure you are in the root of your local repository that is tracked by git already as mentioned on the line above.

rm -r *

4. Checkout and create a branch called deleted_code

git checkout -b deleted_code

5. Add your local changes of deleting the files.

git add .

6. Commit these changes.

git commit -m "deleting all files to prepare for review"

7. Push this branch to git origin.

git push origin deleted_code

8. Checkout and create a branch called code_to_review

git checkout -b code_to_review

9. Grab all of the code from your main repository branch (likely master or develop).

git checkout master -- .

10. This should have added all of the files you deleted back. Add them to git staging.

git add .

11. Commit changes of adding back code.

git commit -m "adding back files to be reviewed"

12. Push code_to_review branch to git origin.

git push origin code_to_review

13. Then open a pull/merge request in your version control hosting provider (ie - GitHub, Bitbucket, GitLab):

14. Request code review from the PullRequest network by: - Clicking "Request Review" in the PullRequest dashboard. - Or adding [pr] to the title of the pull/merge request.

Requesting review from the PullRequest dashboard