Conditional manual approval

I’ve got a workflow that includes a manual approval job as per the documentation:

However, I want to make this approval conditional on a pipeline parameter of type string not matching a defined pattern (eg. 'develop").

Is this possible? Looking through the docs I can’t see a way and there seems to be a feature request from 2018 that as far as I can tell remains open:

I believe that it is still the case that without using the API the limits are still the same.

The workaround/hack that can be used for ‘simple’ workflows is to duplicate the job(s) with different names so that you can duplicate the flows, one flow being run if the condition requires approval and the other flow being run if no approval is needed.

A dated example of this can be found here

This is a 2.0 example using filter, but in 2.1 conditional checks on parameters became possible

1 Like