Potpourri / HubLabBot

:robot: GitHub <-> GitLab integration supporter, interactive bot
MIT License
0 stars 0 forks source link

GitLab CI `rules:changes` always true on PR #16

Open Potpourri opened 4 years ago

Potpourri commented 4 years ago

PR creates from branch, but rules:changes always true for new branch, see more here: https://docs.gitlab.com/ee/ci/yaml/#using-onlychanges-without-pipelines-for-merge-requests

Potpourri commented 4 years ago

When new branch created by mirror sync, rules:changes work as expected.

Potpourri commented 4 years ago

rules:changes work only when:

For $CI_PIPELINE_SOURCE == 'external_pull_request_event' it is always true. See issue: #37098

Potpourri commented 4 years ago

If use GitHub Required statuses for PR with rules:changes, then PR should have only one commit. Since $CI_PIPELINE_SOURCE == 'push' calculates changes from previous commit, and not from branch base.