Skip to content

Add support for variable expansion in rules:changes:compare_to

Max Orefice requested to merge morefice/expand-variable-compare-to into master

Ref: #369916 (closed)

What does this MR do and why?

This MR allows variable expansion for rules:changes:compare_to keyword.

Co-authored by @paul.cacheux

Testing

Create a pipeline with the following .gitlab-ci.yml:

variables:
  BASE_BRANCH: main

test:
  script: exit 0
  rules:
    - changes:
        paths:
          - README.md
        compare_to: $BASE_BRANCH

Before

Expanding_compare_to

After

The pipeline is running successfully as the variable is being evaluated correctly.

Merge request reports