One of my most popular Azure DevOps Extensions is my Release Notes Pipeline task. This allows the creation of release notes using information obtained from the Azure DevOps API and formatted using a Handlebars Template.
Given the popularity of GitHub Actions, I got to wondering whether porting this extension was viable?
Well the release of my new Generate Release Notes with a Handlebars Template action shows that it was.
The basic concept of this new action is the same as for the older task, get information on the pipeline/workflow run using the API and then format it using a Handlebars template. However, the information that can be returned is different. But this stands to reason as GitHub is not Azure DevOps. This is especially true when you consider the differences between the simplicity of GitHub Issues and the complexity, and variability of format, of Azure DevOps Work Items
The new action is focused on the workflow run it is called from. It make an API call to get the details of the run. This contains a lot of information about the run and URL links to associated items. Using these link, the associated information is retrieved using the API and the results added to the objects available in the Handlebars template. In this initial version of the Action the objects tree available in a template includes:
- runDetails – the details of the current workflow run
- pull_requests - the array of pull requests associated with the run
- commits - the array of commits associated with the PR
- comments - the array of comment associated with the PR
- linkedIssues - the array of linked issues with the PR
- pull_requests - the array of pull requests associated with the run
As with my Azure DevOps Extension I have made use of the extensibility of Handlebars. My new action includes all the Handlebar Helpers, plus some action specific helpers I have written and you have the ability to add your own custom handlebar helpers if needed.
So I hope people find this new Action useful, I guess only time will tell