I would like to have a gate which requires at least one work item of the 'Release' type associated with the pipeline. Is there a way to have the gate query execute
SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Release' AND [Com.Pipeline] = "$(Release.DefinitionName)" (or equivalent)?
I need it to work through multiple pipelines, which is why I would like to use on of the built-in variables to avoid creating a hundred separate queries. If not possible, is there a better way to stop deployment from moving to the next stage if there isn't a specific associated work item?