Browser Userscripts For Azure DevOps
![GitHub stars](https://img.shields.io/github/stars/alejandro5042/azdo-userscripts.svg?style=social)
A collection of userscripts to improve the Azure DevOps UI.
These userscripts were tested in Chrome and Firefox with the Tampermonkey extension. They may work with other setups.
Getting Started
- Install the Tampermonkey extension
- Refresh this page if you just installed Tampermonkey (or the download link won’t work)
- Install this userscript
By default, Tampermonkey will automatically update scripts from the original install location once a day. You can force an update from the extensions menu.
Features
PR dashboard improvements
Sorts the PRs in your dashboard into categories:
![(Picture of an example dashboard)](https://alejandro5042.github.io/azdo-userscripts/assets/azdo-pr-dashboard-example.png)
- Reviews are sorted from oldest to newest (reverse of the default)
- Reviews are categorized into sections:
Blocking: Reviews where you are the last reviewer and everyone else approved
Incomplete: Reviews you need to process
Incomplete but blocked: Reviews you have not completed but are blocked anyways because another reviewer voted Waiting on Author or Rejected. This section is open by default- Drafts
- Completed as Waiting on Author
- Completed as Rejected
- Completed as Approved / Approved with Suggestions
Completed as Approved / Approved with Suggestions (with notable updates): PRs that have had notable activity after you’ve approved; e.g. lots of comments or non-approval votes
- Sections remember if they are open/closed
- PRs show how many files the reviewer needs to review
- Your created PRs are also sorted
Also, build status on PRs (see right column)! If it’s empty, there isn’t a build yet for that merge commit, or there isn’t a merge commit yet.
![Build status on PRs](https://alejandro5042.github.io/azdo-userscripts/assets/build-status.png)
More:
- Labels now appear on the overall PR dashboard
- At NI, some labels get coloring (e.g. “bypass owners” gets a red background)
- If a PR has bug work items associated with it, we add a label with the severity of such bugs (if SEV == 1 or 2)
PR diff improvements
You can now mark a file as reviewed with a checkbox! The data persists in local browser storage, so if you come back to the PR later, the checkboxes will still be there (up to 3 weeks).
![Checkboxes in the PR files tree](https://alejandro5042.github.io/azdo-userscripts/assets/file-checkboxes.png)
Note: awesome.visualstudio.com checkbox data is separate from dev.azure.com/awesome checkbox data.
You can now select the base update to compare against with the base update selector:
![Base update selector](https://alejandro5042.github.io/azdo-userscripts/assets/base-update-selector.png)
This allows you to diff many updates at once:
![Example: Update 8 to 12](https://alejandro5042.github.io/azdo-userscripts/assets/diff-many-updates.png)
Note: The selector looks best in Chrome.
Some improvements to the multi-file diff view:
- The file name is now always visible, even if the user scrolled down the page
- The horizontal scrollbar is now always visible (but not for side-by-side diffs)
Before (long lines are cutoff and the scrollbar may be offscreen):
![Text cutoff and no scrolling.](https://alejandro5042.github.io/azdo-userscripts/assets/before-pr-diff-scroll-improvements.png)
After (scrollbar is always visible):
![Scrollbars always visible.](https://alejandro5042.github.io/azdo-userscripts/assets/after-pr-diff-scroll-improvements.png)
You can now use keyboard shortcuts to quickly switch between PR tabs (e.g. Overview, Files, etc). In Chrome, it’d be Alt+1
, Alt+2
, etc. In FireFox, it is Alt+Shift+Num
. See this table for details on your browser.
![PR tab keyboard shortcuts in Chrome.](https://alejandro5042.github.io/azdo-userscripts/assets/pr-tab-accesskeys.png)
Reviewing a large PR? Press the auto-collapse button to make your tree manageable! (National Instruments: If you have an owners review, the button will keep folders open if they contain files you need to review.)
![Collapse folders.](https://alejandro5042.github.io/azdo-userscripts/assets/collapse-folders.png)
PR threads that start with note:
(case insensitive) will appear expanded on page load, even if they are closed. They are also highlighted with a light border. Use this to mark interesting things for your reviewers in your PR!
![Sticky comments are highlighted.](https://alejandro5042.github.io/azdo-userscripts/assets/sticky-comment-highlighting.png)
PR comments that start with await:
(case insensitive) will appear highlighted. Use this to help developers focus their attention on the comments that you want to see again (e.g. the reason why you voted Waiting on Author or Rejected).
![Await comments are highlighted.](https://alejandro5042.github.io/azdo-userscripts/assets/await-comments.png)
Bypass owners reminder
For PRs into branches requiring a passing ni/owners-approved status, hovering over the Approve button pops up a reminder to consider bypassing owners.
PR trophies
Trophies are awarded for notable PRs and shown in a trophies section on the Overview tab. For example:
![Milestone trophy.](https://alejandro5042.github.io/azdo-userscripts/assets/milestone-trophy.png)
Better owners review
These features are currently specific to National Instruments.
The PR file tree will now highlight the files you need to review with a letter to represent your role (Owner, Alternate, Reviewer):
![Files tree highlighting.](https://alejandro5042.github.io/azdo-userscripts/assets/owners-file-tree.png)
Collapsed files are highlighted if they contain files you need to review:
![Highlighted folder.](https://alejandro5042.github.io/azdo-userscripts/assets/owners-collapsed-folders.png)
In the multi-file diff view, your files are also highlighted with a blue line on the left:
![Highlighted diffs.](https://alejandro5042.github.io/azdo-userscripts/assets/owners-diff-highlight.png)
You can also press the new “Toggle other files” button to fade out and collapse the other diffs! (Ideally, I would hide them completely, but if I do, the AzDO interface bugs out.)
![Toggle other files button.](https://alejandro5042.github.io/azdo-userscripts/assets/owners-toggle-other-files.png)
Hopefully all this makes it very easy to scan for the stuff you care about.
Note: If there is no owner info, or if you are not listed, nothing is highlighted and the button does not appear. It also only works with newer PRs (created or updated since approx. July 2019).
Overall
Scrollbars site-wide now match the current Azure DevOps color theme.
Before :persevere:
![Scrollbars before.](https://alejandro5042.github.io/azdo-userscripts/assets/scrollbars-before.png)
After :smirk:
![Scrollbars now.](https://alejandro5042.github.io/azdo-userscripts/assets/scrollbars-after.png)
Also:
- Drop down menus are bigger!
- Prompts to add links to work items are much less prominent, unless hovered over
Documentation
Privacy
The update URL goes through a URL redirector to get a rough idea of how many people are using this script. To opt-out, change the update URL to the original download URL in the Tampermonkey dashboard (or disable updates). The redirector can also help if the URL needs to change; e.g. if the file is moved or renamed.
No other data is collected. The script is sourced and updated directly from the master branch of this repo.
Credits
This is the second version of a PR filtering script originally written by Tian Yu, which faded out approved PRs. Further improved by Alejandro Barreto.
License
MIT. Issues and pull requests welcomed!