6 months ago I posted about Automatic release notes on Azure DevOps. Since then, I was able to make the process a little more centric to Pull Requests and avoid the occasional incorrect work item showing up in the release notes.
The primary difference is that we will use the new Cross Platform Generate Release Notes task instead of the original Powershell based task. This updated version offers a little more control via handlebars extensions that can help us filter out the undesired work items. Here is how the task looks like:
Note that the template is different from before. We use a custom handlebars function that returns a list of work items:
The handlebars function iterates through the whole list of work items exposed by the release notes task and filter out items that are assigned to open PRs, in other words, PRs with status different from 3.
You could go a little further. If you have multiple target branches for your PRs, you could filter only those that are relevant to a particular release environment. Additionally, you could use any other information in the work items or PR can be used to further customize your release notes. It is really up to your needs.
I’m not trying to justify my laziness (or am I?), but I think that every developer and every DevOps engineer should be a little lazy. That’s where we start automating things and life gets much better!