Recently we have been given the option of defining pipelines that only run on pull requests. This is great, but the current way of filtering relevant commits by the name of the branch being PR'ed from is only covering part of the need.
I suggest a feature that lets you run pull-request triggered pipelines based on destination branch name.
Example use case
A test taking a few hours might not be desirable for every PR (they got smaller tests of cause), but must always be performed before a merge into the master branch.
Ideas for implementation
There will be a
pipelines: pull-requests-to: master:
Indicating that it is now the name of the destination branch that filters whether the steps are initiated.
Another way to solve this could be to add syntax sugar to the name of the existing pipeline setup - for example, by prepending with
=> to indicate that the following is the name of the destination branch of the PR
pipelines: pull-requests: '=> master':