Repos, pull requests and the Wiki
Review a pull request line by line, vote on it and complete it; browse a repository's files, history and branches and commit a change; read and write the Wiki; and search the code in every repository. None of it needs Git on your computer.
Find pull requests
Pull Requests in the sidebar lists pull requests across every Project you sync, in three lists along the top:
- Mine: the ones you created.
- To review: the ones waiting for your review. Its count is the one on the sidebar, the menu bar or tray icon and the Dock.
- Active in my Projects: every open pull request in the Projects you sync.
The button beside the lists, Group by repository, puts each repository's pull requests under its name; press it again for one list by date. New pull request starts one, and the refresh button reads the lists again from Azure DevOps.
Each repository has its own list too: open the repository under Repos in its Project, and choose Pull Requests. It has Active, Completed and Abandoned, the Flow of its pull requests, and filters for Any author, Any reviewer and Any target branch.
Click a pull request to open it. It opens on the tab you last used: Overview, Files or Commits, and Conflicts while the merge has conflicts.
Read a pull request
The header has the title and number, its status (Active, Draft, Completed or Abandoned), the source branch and the branch it goes into, who created it and when, and whether it can be merged. On the right are Vote, Complete… (or Publish for a draft), the … menu, and a button that opens it in Azure DevOps.
The Overview tab has:
- Description, in Markdown. Its author can edit it here.
- Discussion: every comment thread, including those on files. A thread on a file says where it is, and clicking it opens that file in Files at its line. Write a new comment in the box at the top and press ⌘↵ or Comment.
- Reviewers, required and optional, with each one's vote. Add asks someone else to review.
- Policies and checks: the branch's policies and how each stands. A build opens as its Run, and a failed one can be queued again with Queue again.
- Work Items linked to it. Link adds one; each opens like any other Work Item.
- Tags, with Add tag.
A pull request that's open is read again from Azure DevOps every 30 seconds, and the line at the bottom of the right-hand column says when it was last read. Commits lists its commits by push.
Review the files
Files shows what the pull request changes: the changed files as a tree on the left, and the file you've chosen on the right with its changes highlighted by language. The bar along the top chooses how it's shown.
- Inline or Side by side: the old and new lines in one column, or the version before and after in two.
- Changes or Whole file: just the changed lines with a few around each (the rest fold away as Show N more lines), or every line of the file with the changes marked. The line at the top stays where it is as you switch.
- Ignore whitespace counts lines that differ only in their spaces as unchanged.
- The menu at the left (Latest · all changes) chooses which update of the pull request to look at, and what to compare it with: an earlier update, to see just what changed since then.
Within a changed line, the words that changed are underlined and shaded a little more, so a one-character change is easy to see. On the right of the bar, the count of threads by status (active, pending, resolved and so on) says how much discussion is left.
Move around
- Click a file in the tree, or press n and p for the next and previous file. Filter above the tree narrows it by name.
- ] and [ go to the next and previous change in the file.
- j and k (or ↓ and ↑) move from line to line once you've clicked into the diff.
- ⌘F finds text in every line of the file, folded or not. Enter goes to the next place and ⇧Enter to the one before; a place inside a fold opens the fold.
Drag the tree's right edge to widen it for long names, or use the arrow keys on it; a double-click or Enter on the edge puts it back. Rest the pointer on a file or folder to see its whole path beside it (move onto it to select and copy it). A file too large to show here says so, with Open on the website.
Keep your place
Tick a file as Viewed with the box on its row, or press v on it in the tree. The tick is for that version of the file: when a later update changes it, the tick goes and the file says New changes. Under the filter is how many of the files you've viewed, and Next unviewed (u) goes to the next one you haven't.
When someone else's pull request has an update newer than the one you last voted on, or last opened on this computer, Files opens on just what's new since then, and says so in the bar. All changes beside it shows everything again. It stays that way while you go to Overview and back.
Comment, reply and suggest
Comment on a line
- Rest the pointer on a line and click the small button at its left edge, or move to the line with the keys and press c. To comment on several lines, hold ⇧ while you click the last one, or while you press ↓ or ↑.
- Write the comment in Markdown. Type @ to mention someone and # to mention a Work Item, then choose from the list.
- Press ⌘↵, or the button under the box, to send it.
Comment on file, at the top right of the file, comments on the whole file rather than a line.
Reply and resolve
Reply answers a thread, and Resolve marks it resolved. The status beside the thread's line (Active, Pending, Resolved, Won't fix, Closed or By design) changes it to any of the others. The arrow at a thread's left folds it away. Like a comment with the thumb under it; edit or delete your own with the pencil and the bin.
Suggest a change
While you write a comment on lines of the new version, Suggest a change puts those lines in the comment as a suggestion. Change them to what you'd like them to be. The author sees the suggested change and can Apply it with one click, which puts it on the source branch and resolves the thread; anyone else sees The author can apply it.
A comment, reply or edit you've written and not sent is kept on this computer until you send it or cancel it. Go to another file, another screen, or quit, and it's there when you come back; its file shows a pencil in the tree. If the pull request has been updated in the meantime, a new comment's box says its line was another update's, or offers it on the whole file when the line has gone.
Vote
Vote in the header has Approve, Approve with suggestions, Wait for author, Reject and Reset feedback. Your vote shows on the button and beside your name under Reviewers.
Complete a pull request
- Choose Complete… in the header.
- Pick the merge type. Only the ones the target branch's policy allows are offered: Merge (no fast forward), Squash commit, Rebase and fast-forward, or Semi-linear merge.
- Check the commit message. It starts with the pull request's title and its linked Work Items.
- Tick whether to delete the source branch and complete the linked Work Items after merging.
- Choose Complete merge.
While required policies aren't passing, the dialog lists them and offers Set auto-complete…: the pull request then completes by itself, with the choices you made, as soon as they pass. Set auto-complete… and Cancel auto-complete are in the … menu too. If you're allowed to override the branch's policies, the dialog also has Override the branch's policies and complete, which asks for a reason.
The … menu
- Mark as draft takes your pull request back to a draft, so reviewers aren't asked until it's published; Publish asks them.
- Edit title… on your own.
- Abandon… closes it without merging; Reactivate opens an abandoned one again.
- Cherry-pick… and Revert… on a completed one (below).
- Copy link copies its address in Azure DevOps.
Create a pull request
- Choose New pull request in Pull Requests or in a repository's pull requests, or type new pull request in the command palette. From a comparison of two branches (Branches), the button fills them in.
- Pick the Project, repository, the branch to merge from and the branch it goes into. It says how many commits there are to merge.
- Write the title and description. The description starts from the repository's pull request template when it has one.
- Add reviewers, and the Work Items to link: those mentioned in the branch's commits are suggested.
- Tick Create as a draft if reviewers shouldn't be asked until you publish it, then choose Create.
Resolve merge conflicts
When the source and target branches change the same lines, the header says Merge conflicts and the Conflicts tab lists each file with its kind (edit/edit, delete/edit, add/add and so on) and both branches' changes. You can resolve them here, without a checkout.
- Choose a file in the list.
- Take one side with Take source or Take target, or choose Edit merged… to write the result yourself.
- In the merged version, each place the branches overlap starts with conflict markers. Use Source, Target or Both for each place, or edit the text. The base, target and source versions are beside it to compare. Start again goes back to both branches' changes.
- Choose Save merged version.
A binary or very large file takes one side or the other. Until the merge is tried again you can undo a resolution. Azure DevOps tries the merge again once every file is resolved, or when you choose Try the merge again; then Complete… is available as usual. What you save is kept in Azure DevOps as how the file is resolved; the target branch changes only when the pull request is completed.
Resolving conflicts needs permission to contribute to the repository's pull requests. Without it, the tab shows the conflicts and says why you can't resolve them, with Open on the website.
Cherry-pick and revert
A completed pull request's … menu has Cherry-pick… and Revert….
- Cherry-pick puts its changes on a new branch, made from a branch you choose: a release branch, say.
- Revert takes them out again, on a new branch made from the branch it went into.
The new branch's name is offered free of the ones the repository already has. Azure DevOps makes the branch, which can take a moment; the dialog stays until it has. New pull request then opens for it, filled in. If you close that, the branch is still there in Branches for later. If the changes conflict with the branch, it says so and offers the website: that's for a checkout to resolve.
See how pull requests flow
A repository's pull requests have Flow beside Active, Completed and Abandoned. It shows how its pull requests move, over the last 14, 30 or 90 days.
- Completed: how many were completed in the period.
- Typically took: the middle time from being opened to being completed (time as a draft counts).
- Most within: once there are five, how long 85 in a hundred took at most.
- Open now, the longest open first, each saying what it waits for: review, its author (a reviewer is waiting for them or has rejected it, or it has merge conflicts), to be completed (every required reviewer has approved it), or to be published (a draft).
- The people asked to review that haven't voted, with how many wait for each, and the slowest five to complete.
It goes by reviewers' votes and the merge: a policy that isn't a reviewer, such as a build, isn't looked at, and the author's own vote doesn't count. It's worked out from the repository's lists as the app keeps them, so it's there offline, and says how things stood when they were read. Only the newest 100 completed and 200 open pull requests are read; it says "at least" when there may be more.
Pull requests need Code (Read) to read, and Code (Read & write) to vote, comment, complete or resolve conflicts. Cherry-pick and Revert need Code (Read, write & manage) and permission to create branches in the repository. Changing a pull request needs a connection: offline, the actions are off and say why.
Browse a repository
Each Project in the sidebar has Repos, which lists its repositories. Choose one to open it. Along the top are Files, Commits, Branches, Tags and Pull Requests, the branch, tag or commit you're looking at, and a box to search the repository's code.
Files
Files shows the repository at any branch, tag or commit: choose it from the menu beside the tabs, where you can also find a branch or tag by name or paste a commit ID. The path along the top goes back up to any folder. Files are highlighted by language, and Markdown files, such as a README, are shown rendered.
- ⌘F finds text in the file.
- Blame shows, beside each line, who last changed it, when and in which commit.
- History lists the commits that changed the file.
- The buttons on the right copy the path or a link, download the file and open it in Azure DevOps.
- Find file, or t, finds a file by name anywhere in the repository: type a few of its letters and press Enter.
Edit a file and commit it
- Open a text file at a branch and choose Edit.
- Make your changes, then choose Commit….
- Write the commit message, and choose whether to commit to the branch or to a new branch. A new branch can come with a pull request into the branch you started from: tick Create a pull request.
- Choose Commit.
A branch whose policies require pull requests can't be committed to directly; the dialog says so and offers a new branch instead.
Commits
Commits lists the branch's commits, the newest first. Filter them by Author, by a date From and To, and by path (from a file's or folder's history). A commit opens with its changed files and diffs, shown as in a pull request (just the changes or the whole file, the words that changed, Ignore whitespace and ⌘F), and the Work Items linked to it.
Branches
Branches lists Mine (the ones you made, or where you made the last commit, marked with a star) or All, each with its last commit and how far it is behind and ahead of the default branch. A branch with an open pull request shows its number. New branch makes one from a branch, tag or commit, optionally linked to a Work Item; the bin deletes one, after asking. Enter on a branch, or a click, browses its files.
The compare button on a branch compares it with the default branch. Choose either branch from its menu, or swap them. The comparison has the Files that differ and the Commits between them, and New pull request starts a pull request from the one into the other.
Tags
Tags lists the repository's tags. New tag makes one on a
branch or commit, with a name (such as v1.5) and an optional message saying what it marks. A tag
can be deleted from its row, after asking. Choosing a tag opens the repository's files at that version.
Read the Wiki
Each Project's Wiki in the sidebar opens its wiki. When a Project has more than one (its Project wiki and wikis published from code), the menu beside Wiki at the top switches between them. A Project without a wiki can make its Project wiki here.
The page tree is on the left; a page with pages under it opens out with its arrow. Pages show as they do on
the website: tables, task lists, a table of contents where the page has [[_TOC_]], Mermaid
diagrams, images and videos, mentions of people, and links to other pages and to Work Items. A Work Item link
opens the Work Item here. Under the title is who last edited the page, when, and how many times it's been
viewed lately.
Search the wiki at the top finds pages by their words. Pages you've read are kept on this computer, so they're there offline, marked as possibly out of date.
A Wiki link on a Work Item opens the page here too.
Write the Wiki
- Choose Edit on a page, or press e.
- Write in Markdown. The toolbar adds bold, italics, headings, links, code, lists, task lists and tables; the last button attaches an image or file, or paste or drop one into the text.
- Choose Write, Side by side or Preview to see the text, the text beside how it will look, or just how it will look.
- Choose Save. Until then it says Not saved, and Cancel asks before throwing your changes away.
New page at the top makes a page. A page's … menu has New page under this one…, Rename…, Move to… (the pages under it move with it), Copy link, Copy ADO Local link and Delete….
If someone else saved the page while you were editing it, their version and yours show side by side. Keep mine saves yours over theirs, Take theirs loses your changes, and Copy my text copies what you wrote first.
Wiki changes are saved straight to Azure DevOps, so editing, and making, moving and deleting pages, need a connection. They don't wait to be sent. A Personal Access Token needs Wiki (Read & write).
A page's history
History on a page lists every version: its message, who saved it and when. Choose one to see what it changed, Inline or Side by side, compared with the version before it or another you pick under Compared with. Back to the page returns to it.
Search code
Search, in the sidebar or with /, has a Code tab beside Work Items. It uses Azure DevOps' Code Search to look in the default branch of every repository in the Projects you sync.
Type words to find, and narrow them with Azure DevOps' syntax:
| Type | To find |
|---|---|
"open settings" | an exact phrase |
ext:ts | files with this extension |
file:*.md | file names, with * and ? |
path:/src/settings | files under a folder (with one repository) |
repo:contoso-app | one repository |
proj:"Contoso Mobile" | one Project |
def:loadSettings | where something is defined |
class:Settings | a class |
a AND b, a OR b, NOT c | combine words |
The Project, Repository, Path and File type buttons under the box add the same filters without typing them; Clear filters takes them all away. With nothing typed, the Code tab lists this syntax and your recent searches.
ext:tsx.↑ and ↓ move between files, and Enter opens the file at its first match; a line clicked opens the file at that line. Results come 25 files at a time, with Load more. A file with more matches than are shown says so: open it to see them all.
In a repository, the search box at the top searches just that repository: press Enter and Search's Code tab opens with the words and the repository's filters.
Code search asks Azure DevOps each time, and results aren't kept on this computer. It needs the Code Search extension in the organization: without it there's no Code tab or repository search box. A repository that's still being indexed says Still indexing; try again later. A Personal Access Token needs Code (Read).