Pull-request for pipeline based on destination branch

Issue #17859 open
Mathias Rangel Wulff
created an issue

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

Similar to

pipelines:
  pull-requests:

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':

Comments (2)

  1. Aneita Yang staff
    • changed status to open

    Thanks for reaching out and for the suggestion, @Mathias Rangel Wulff. I can definitely see why this would be useful, especially when merging to the master/main branch.

    Given our current priorities, however, this is unlikely something that we'll support in the short term. In the meantime though, I'll open this ticket to gauge the interest of other users in seeing the same thing.

  2. Log in to comment