AZD: Review a pull request
When you open a pull request, AZD shows its details in a tab of the AZD Pull Requests tool window. The tab title is the pull request number, for example !42. From the details, you open diffs and the timeline, check out the branch and see what blocks the merge.
Open a pull request
Open a pull request and read its details
Open the AZD Pull Requests tool window. For the ways to open it, see Open the tool window.
Double-click a pull request in the list.
Read the header of the details tab:
The title and the pull request number. Click the number to open the pull request in the browser.
View Timeline opens the discussion and history; see Read the timeline.
The commit selector shows the changes from all commits. Select one commit to see only its changes.
The source branch. Click it to check it out; see Check out the pull request branch.
Double-click a file in the changed files tree to open its diff.
Right-click the pull request title for Refresh Pull Request, Review with AI, Open Pull Request in Browser and Copy Pull Request URL. The right-click menu of the changed files tree also has Link Work Item.
Check out the pull request branch
Click the source branch name in the details header to open the branch popup:
- Checkout
Fetches the source branch and checks it out in the current working tree.
- Open in Worktree
Fetches the source branch and opens it in a new Git worktree, so your current branch stays untouched. The worktree opens as a separate project. AZD stores it under tmp/azdReviewWorktrees in the IDE system directory. The option appears for active pull requests that are not from a fork, when the branch is not checked out yet and the project has a single Git repository.
- Show in Git Log
Shows the source branch in the Git tool window.
- Copy Branch Name
Copies the name of the source branch to the clipboard.
Some features need the branch locally, for example applying suggested changes.
Review on the current branch
When the checked-out branch has an open pull request, the branch popup of the main toolbar shows Pull request !N on followed by the branch name, with these actions:
- Show Pull Request in the Tool window
Opens the details of the pull request.
- Review Mode
Shows the pull request in the regular editor. Changed lines are marked in the gutter, and unresolved review comments appear between the lines. To add a comment, hover over a changed line and click + in the gutter, as in the diff. Review Mode is on by default, and AZD remembers the setting for the project.
- Update to Enable Review Mode…
Appears when your local branch is out of sync with the remote branch. Updates the branch so that comments match the code.
Go through the changed files
The changed files tree shows how many comments each file has and whether you have viewed it. The progress line, for example Viewed: 3 out of 7, tracks your review.
To mark a file as viewed, right-click it and select Mark as Viewed, or press Ctrl+Shift+S. Press it again for Mark as Not Viewed.
To show only some files, use the filter above the tree: All Files, Unviewed Only or Viewed Only.
To mark every file you open as viewed, select Automatically mark opened files as viewed in .
The right-click menu of a file also has Show Diff, Show Diff in a New Tab, Jump to Source, View Options for grouping, Expand All and Collapse All.
Read the diff
The diff opens in an editor tab named Diff for Pull Request !N. Review comments appear between the lines, and the toolbar after Review: has these buttons:
- Previous Comment, Next Comment
Move between the comments of the file. They use the Previous Occurrence and Next Occurrence shortcuts of your keymap, Ctrl+Alt+Up and Ctrl+Alt+Down on Windows and Linux. To see the macOS keys, search for these actions in .
- Refresh Review Data
Reloads the comments of the pull request.
- AI button
Creates AI draft comments for the file; see Generate draft comments for a file.
- Submit Comments
Publishes your draft comments; see Review with draft comments.
To hide or show comments in the diff, right-click the gutter of the diff, point to Show Review Discussions and select All, Unresolved Only or Do Not Show. To add comments, see AZD: Comment and suggest changes.
Read the timeline
The timeline shows the description and the history of the pull request in one editor tab.
Open and filter the timeline
In the pull request details, click View Timeline.
The Timeline for !N tab opens. It starts with the author, the source and target branches and the description, followed by the events.
Optional: to show only some events, click the filter icon in the timeline header and select event types.
- All Events
Every event.
- Comments
Comment threads on the pull request and on files.
- Commits
Pushes that added commits.
- Votes
Reviewer votes.
- State
State changes, such as completed, abandoned or reactivated.
- Reviewers
Reviewers added or removed, and required or optional changes.
- System
Other events created by Azure DevOps, such as policy messages.
- My Comments/Replies
Threads that you started or replied to.
- Active Comments
Threads that are still active.
Click a commit in a commits event to open the pull request details with that commit selected. To open such links in the browser instead, clear Open commit links from the timeline in the IDE in .
The timeline lists events from oldest to newest. To show the newest events first, clear Show events in the order ascending by date in . To comment on the whole pull request from the timeline, see Comment on the whole pull request.
Edit the description
Only the author of a pull request can edit its description.
Edit the pull request description
In the pull request details, click View Timeline.
Hover over the description and click Edit (the pencil icon) in its header.
Change the text. Type
!to reference a pull request, or#to reference a work item.Click Save Changes.
To let AI rewrite the description after you push more commits, see Update the description of an open pull request.
Check the status and branch policies
The bottom of the details tab lists what Azure DevOps requires before the pull request can be completed. Each row comes from a branch policy or a check on the target branch.
- Work items: N, Details
The linked work items. Click Details to list them.
- Work items must be linked
A policy requires at least one linked work item; see Link work items.
- Comments must be resolved
A policy requires all comment threads to be resolved. Click View Comments to open the timeline with the comments.
- Proof of presence is required
A policy requires an extra confirmation that you complete in Azure DevOps.
- All required checks have passed, Checks in progress…, Checks failed
The summary of build validation policies. Click Details… to open the Open in Pipeline View popup and open a run. If a build has expired, AZD asks whether to re-trigger it.
- Status Checks
Status policies that external services post to the pull request. Click Details… to see each check.
- At least N reviewer(s) must approve
The minimum number of reviewers policy, including variants that do not count the author or the most recent pusher.
- Required reviewers must approve
A required reviewer has not approved yet.
- Reviewer rows
The vote of each reviewer; see Reviewer status.
If Open AZD links in tool window is selected in , build runs open in the AZD Pipelines tool window; otherwise, they open in the browser.
Merge status
Under the conflicts row, AZD explains merge outcomes that Azure DevOps reports:
A merge that Azure DevOps is still evaluating is shown as pending until the evaluation finishes.
Azure DevOps rejected the merge because of a branch policy appears when a policy blocks the merge.
Azure DevOps could not compute the merge appears when the merge cannot be calculated.
If the branches conflict, the conflicts row reads Branch has conflicts that must be resolved.
Resolve conflicts locally
In the conflicts row, click Resolve.
In the dialog, click Merge to merge the target branch into the source branch, or Rebase to rebase the source branch onto the target branch. The IDE fetches the target branch, checks out the source branch and starts the merge or rebase.
Resolve the conflicts; see Resolve Git conflicts (IntelliJ IDEA help).
Push the source branch. After a rebase, use Force Push.
While the source branch is checked out, Resolve is disabled, and its tooltip reads Already resolved locally, push your changes to resolve.
Link work items
Link a work item to a pull request
Right-click the changed files tree of the pull request, or the timeline, and select Link Work Item.
In the Link Work Item to Pull Request dialog, select the Project and the Work Item. Clear Only my work items to search all work items.
Click Link Work Item.
AZD confirms with a Work item linked notification, or shows Couldn't link work item with the reason. To work with work items, see AZD: Boards and work items.
Comment, vote and complete
To comment on code, reply to threads and suggest changes, see AZD: Comment and suggest changes.
To vote, manage reviewers and complete or abandon the pull request, see AZD: Vote, complete and merge.
To let AI review the pull request, see AZD: Review pull requests with AI.