Review pull requests

Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2022 | TFS 2018

Visual Studio 2022 | Visual Studio 2022 | Visual Studio 2015

After you create a pull request (PR), transport the PR for review by stakeholders. You can add together required or optional reviewers to your PR. Required reviewers must approve the PR earlier it tin can merge.

Teams can also set co-operative policies that crave a minimum number of reviewers, or certain required or optional reviewers, before certain PRs in protected branches can merge. You can alter optional included reviewers to exist required or remove them, but you lot can't remove reviewers that are required past branch policy. To larn more about setting co-operative policies and reviewers, see Automatically include code reviewers.

Loftier-quality reviews get-go with high-quality feedback. For guidelines on getting and giving expert review feedback, see Pull request feedback.

Prerequisites

  • Repos must be enabled on your project. If the Repos hub and associated pages don't display, see Turn an Azure DevOps service on or off to reenable Repos.

  • To review PRs, you must exist a fellow member of the Azure DevOps project the PR is in, with Basic admission or college. If you aren't a project member, get added.

    Note

    For public projects, users granted Stakeholder access accept full access to Azure Repos.

  • Repos must be enabled on your project. If the Repos hub and associated pages don't display, run into Turn an Azure DevOps service on or off to reenable Repos.

  • To review PRs, you must be a member of the Azure DevOps project with Basic access or college. If you aren't a projection fellow member, get added.

  • To view or review PRs, you must be a fellow member of the Azure DevOps projection with Bones admission or college. If you aren't a project member, go added.
  • To learn more well-nigh permissions and access, see Default Git repository and branch permissions and About access levels.
  • In Azure DevOps Services, you can manage PRs and other resources from the Azure command-line interface (CLI) with the azure-devops extension. To learn how to work with the Azure DevOps Services CLI, see Become started with Azure DevOps CLI. Azure Repos CLI commands for PRs utilise az repos pr.

Browse changes

To give a quick picture of PR status, the PR Overview tab summarizes checks, requirements, and branch policies that the PR is passing or failing. In some cases, the summary shows a snippet of the failure bulletin from a status check's log. The overview lists but failed policies, but you can see all the passed and failed policy checks by selecting View <n> checks.

On the PR Overview tab, you can review the PR description and comments to understand proposed changes and run across bug other reviewers raised.

Screenshot that shows the PR overview tab.

Review files

Select the PR Files tab to review the actual changes fabricated in the source branch, Inline or Side-by-side with the target branch.

You tin see how Markdown files volition look published by selecting the View push button on a file, and and so selecting Preview.

Screenshot that shows a side-by-side diff view of file changes in a P R.

Notation

When viewing the difference for a single selected file, at that place'south a file size limit of five MB. To view and diff files larger than five MB, you can download the file and view information technology using a local diff tool. When viewing the departure for a collection of files, the size limit for each file is 0.5 MB, for performance reasons.

Select the PR Files tab to view the actual changes made to the source branch adjacent to the target branch of the pull request.

PR files

Note

When viewing the departure for a single selected file, there's a file size limit of 5 MB. To view and diff files larger than 5 MB, you can download the file and view it using a local diff tool. When viewing the difference for a collection of files, the size limit for each file is 0.5 MB, for performance reasons.

Review updates

You can review previous versions of the code from the All Changes drop-downward list. Every update to the branch adds a new version to the listing and on the Updates tab of the PR. As you select different updates, the diff view updates to show the differences between the files in each version of the PR.

You tin take hold of up with PR updates after being abroad from the PR by stepping through changes made since your concluding review. Yous can view multiple updates at one time by pressing Shift while selecting the updates you want to see.

Screenshot that shows the All changes drop-down.

Review previous versions of the code from the All updates driblet-down list.

PR updates

Every update to the branch adds a new version to the list and on the Updates tab of the PR. As you select different updates, the unequal view updates to show the differences betwixt the files in each version of the PR.

You can take hold of up with PR updates after being away from the PR by stepping through changes made since your concluding review.

Browse a list of changes from the author on the Updates tab.

Browse a list of changes from the author.

View and select changes made in commits to the branch on the Commits tab.

PR commits

Browse a list of changes from the author on the Updates tab.

Browse a list of changes from the author.

View and select changes made in commits to the branch on the Commits tab.

PR commits

Add comments to a PR to make suggestions, reply to previous comments, and point out problems with the proposed changes.

  • Annotate inline in the Files tab of a PR by hovering over the line y'all desire to annotate on and selecting the comment button .

    Screenshot of comments in Azure Repos P Rs.

  • Comment inline in the Files tab of a PR by hovering over the line you want to comment on and selecting the comment button Comment button in a PR.

    Screenshot of comments in Azure Repos P Rs.

  • Give feedback not tied to a specific code line by commenting on the Overview tab.

  • Address the writer or other reviewers direct in your comments by using @username, and reference work items by using #workitemID. You can also reference other PRs by using !pullrequestID.

Suggest changes

To suggest changes directly, select the lightbulb icon in the comment interface, make your suggested changes in the code, then select Comment.

Screenshot showing how to make a suggested change.

To edit or delete a annotate you made, hover over the comment and select the pencil icon to edit the comment, or the garbage tin can icon to delete the comment.

To like your own or someone else's annotate, hover over the comment and select the thumbs-up icon. Comments with likes evidence a filled in icon and the number of likes in the comment list. Hover over the icon to encounter the listing of people who liked the comment.

Screenshot showing the edit, delete, and like buttons in a P R comment.

To like a comment that y'all or someone else fabricated, select the eye icon. Hover over the icon in comments to see the list of people who liked the comment.

You tin select which comments and updates show on the Overview page. Hiding some comments and updates gets them out of the way when reviewing code for the offset time. You tin can likewise testify just what's new since the last fourth dimension you visited the PR.

To filter comments and updates, select the Prove everything (northward) push button above the comment list, and select one of the filtering options. The view changes to show only the selected comments and updates. The push label changes to show the filtering criteria and the number of items shown.

Screenshot showing the options to filter the comment list in a P R.

Vote on changes

  • Browser
  • Visual Studio
  • Azure DevOps CLI

Use the button at upper right in the PR to vote on the PR changes. The default selection is Corroborate, only you tin can select other options from the dropdown list:

Screenshot that shows P R voting options.

  • Approve: Approve the proposed changes in the PR.
  • Corroborate with suggestions: Approve the PR, only provide optional suggestions for improvement.
  • Wait for author: Don't approve the changes, and ask the author to review your comments. The author should allow you know to review the code again after they address your concerns.
  • Reject: The changes aren't acceptable. Get out a comment in the PR to explain why.
  • Reset feedback: Remove your vote.

Reset feedback

  • Browser
  • Visual Studio
  • Azure DevOps CLI

To remove your vote from a PR, select Reset feedback from the Approve dropdown listing at upper correct in the PR.

Screenshot that shows selecting Reset feedback from the Approve dropdown list.

To make quick updates to your PR in response to comments, select Edit on the Files page in your branch on the web.

Screenshot that shows the Edit button to update code directly in Azure Repos.

Later updating your files, commit changes and push the updates to your PR.

You can also immediately utilize reviewers' suggested changes by selecting Apply alter in the comment on the PR Overview page. Once you've applied all the changes you desire, select Commit all changes.

Screenshot that shows the Apply change button in a PR comment.

You can make quick updates to your co-operative direct from the Files tab in Code on the web.

Screenshot that shows the Edit button to update code directly in Azure Repos.

Reply and resolve comments

Answer to comments and update comment status to let reviewers know how you're addressing their comments and suggestions.

  • To resolve a comment without replying, select Resolve under the annotate.
  • To respond to the comment, type your response in the Write a answer field, and select Reply.
  • To reply to and resolve the annotate, type your response in the Write a respond field, and select Reply & resolve.
  • Answer to specific reviewers by using @username in the reply, and reference piece of work items past using #workitemID. You can also reference other PRs past using !pullrequestID.

New comments start in Active status. Select Resolve or Reply & resolve to update comment status to Resolved.

Update comments in Azure Repos P Rs.

More options are available in the comment resolution dropdown list:

Screenshot of more options in the comment resolution dropdown list.

  • Agile: The comment is notwithstanding under review.
  • Pending: The consequence in this comment will exist addressed, merely isn't fixed still.
  • Resolved: The result brought upwards in this comment is fixed.
  • Won't gear up: The suggestion in the annotate is noted, but this PR won't address information technology.
  • Closed: Discussion for this comment is closed.

To keep track of files that have already been reviewed, select More options next to a file in your PR, and and then select Marking as reviewed.

Adjacent steps

  • Pull request update notifications
  • Near pull requests and permissions