Adding files to code reviews

Add files to code reviews when other users need to review them. The following information explains how to perform reviews from the Source Tree window. You can also add files to reviews when performing the following actions.

Keep the following in mind:

  • You can only add files to unapproved reviews. If you have security permissions to edit other authors' code reviews, you can add files to any unapproved reviews. Otherwise, you must be the author to add files to the review.
  • How the file is added to the code review affects how the contents are displayed during the review. If the file is added to the review from the Source Tree window or when adding files or analyzing risk, the entire file contents are displayed for review. If the file is added to the review when checking in changes, viewing file history, or promoting or rebasing files, the differences between file versions are displayed for review. See Reviewing files in code reviews.

1. Select a file and choose Activities > Code Review > Add to Code Review. You can also drag files to code reviews from the Source Tree window to quickly add the current version to a review.

The Add to Code Review dialog box opens.

2. Select the Code review to add the files to.

  • To create a new review, select <New code review> and enter the review details. See Creating code reviews.
  • To add the file to an existing review, select the review from the list or click Select to view review details and determine which review to add the file to. See Selecting code reviews. The authors, reviewers, and notes for the selected review are displayed. Click the Files tab to view files already in the review. Click the History tab to the view the review history.

3. Click OK.

The file is added to the review.

After all files needing review are added, start the review to notify the reviewers. See Starting code reviews.

Other ways to add files to code reviews