You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am a beginner to Azure DevOps and extensions and our team is using XplatGenerateReleaseNotes:v3.x to generate reports.
After reading the documentation, I realize that some custom Handlebars extension could be implemented by exporting functions in YAML.
However, I wonder if it's possible to do some advanced operations such as fetching external data and use them in the report?
I've gave it a simple try but seems like Handlebars doesn't support asynchronous call.
I wonder if my code could be modify to support such a feature or it's just not possible for this extension?
2020-11-03T02:57:42.5744402Z (node:87037) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 18.179.245.253:443
2020-11-03T02:57:42.5745830Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
2020-11-03T02:57:42.5747028Z (node:87037) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2020-11-03T02:57:42.5748700Z (node:87037) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered:
I have done some research and you are correct that out the box (as I have used) Handlebars does not allow async custom extensions.
To make this work I would have to make use one of the methods listed here. My concern is that this is an old thread and I have not found anything newer.
Given the lack of a definitive solution, I have no plans to alter my current implementation to support async extensions.
OK~~
Actually I've traced the implementation of loading custom Handlebars extensions yesterday and realized that it would be hard to make some changes since it's an issue of Handlebars itself.
Also, it's important to keep the sustainability of a long-term supported extension like yours.
Therefore, we'll try to create an Azure DevOps extension our own for the preprocessing (e.g., get data from APIs) and see if these data could be read or loaded later by your extension :D
I would like to thank you again for the quick reply and spending time on surveying this issue.
Hope this discussion could also help those who have the same needs :)
Hello, I am a beginner to Azure DevOps and extensions and our team is using
XplatGenerateReleaseNotes:v3.x
to generate reports.After reading the documentation, I realize that some custom Handlebars extension could be implemented by exporting functions in YAML.
However, I wonder if it's possible to do some advanced operations such as fetching external data and use them in the report?
I've gave it a simple try but seems like Handlebars doesn't support asynchronous call.
I wonder if my code could be modify to support such a feature or it's just not possible for this extension?
The code looks like:
And the log:
The text was updated successfully, but these errors were encountered: