Replies: 1 comment 5 replies
-
Can you not use the Pull Request array as an easier starting point?
But if you need to loop in a different way, you can make your custom extension as complex as you like, it is just javascript and can manipulate any content you provide it, |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm currently trying to categorize the release notes based on which PRs address fixes vs. which PRs address features, specific for an Azure devops yaml pipeline. Taking the starting template for generating the release notes as a starting point, I've came up with this for categorizing pull requests for Bug items addressing fixes:
{{#forEach workItems"}}
{{#if (eq (lookup this.fields 'System.WorkItemType') 'Bug')}}
{{#forEach this.relations}}
{{#if (contains this.attributes.name 'Pull Request')}}
{{#with (lookup_a_pullrequest ../../pullRequests this.url)}}
{{this.title}}
{{/with}}
{{/if}}
{{/forEach}}
{{/if}}
{{/forEach}}
Does an okay job as a starting point, but I would also like to sort the titles of the pull requests being iterated based on the title, as well as break out when a PR in relation to the work item gets found to prevent duplicate listings. I have the extension for each_with_sort_by_field.js, but I would need to save all pull requests found, and then sort them out when the main foreach completes before listing them out. Would it be possible to get guided on how to best perform that action? Would making a custom handlebar extension facilitate this? I'm new to this and still picking up the ropes. Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions