How to view Azure DevOps Pull Requests in Confluence
The how-to guide on how to add and view Azure DevOps Pull Requests in a Confluence page
Using the Azure DevOps Pull Request macro
You need to ensure the Pull Requests can be accessed by the user who created the personal access token and the Code (Read) access scope is provided. Talk to your Confluence admin if unsure.
This macro provides an easy way to view the status of Azure DevOps Pull Requests by embedding them in Confluences pages.
Quick Guide
Copy the Azure DevOps Pull Request URL
Paste the Azure DevOps Pull Request URL into a Confluence page.
Detailed Guide
Here is an example of how the macro looks in Confluence
To add a Pull Request macro to Confluence, you require the Azure DevOps Pull Request URL.
Go to the Azure DevOps Pull Request you wish to display in Confluence as shown below, then copy the URL from the browser.
The URL should be in the following format: <BASE_URL>/<ORG>/<PROJECT>/_get/<PROJECT_NAME>/pullrequest/<ID>
If you are using Microsoft Azure DevOps running On-Premise, you need to make sure you are using the URL accessible from the Internet.
How to Add the Pull Request Macro
The easiest way to add a Pull Request Macro to a Confluence page, is to simply paste the Azure DevOps Pull Request URL into a Confluence page and the macro should populate automatically.
Alternatively, you can open a blank Pull Request Macro instance in one of two similar ways.
Typing / followed by the Macro name (e.g. /Pull) as shown, the macro will populate, allowing you to select it
This can also be achieved by typing the name into the ‘Insert elements’ drop down and selecting the macro.
Configuring the Pull Request Macro
To access the macro configuration sidebar, either click on a newly added blank Pull Request macro, or alternatively click on an existing Pull Request macro, then click the edit button as shown below
Both options will open the Azure DevOps Pull Request configuration sidebar to the right.
Url
This is the link to the Azure DevOps Pull Request you wish to display
Show reviewers
This option allows you to show any listed reviewers for the Pull Request. The reviewers will be identified by an icon, and the reviewers name will be displayed when mousing over the icon.
The check mark next to the reviewers name denotes if it’s approved or rejected.
Show merge conflicts
This option allows you to show or hide any merge conflicts in the Pull Request, denoted by the red X.
Demo
You can find a demo of the Pull Request macro from YouTube below:
https://youtu.be/y73BRNri9pI?feature=shared&t=11
Updated: