ee-files-location-check doesn't respect CE branch ordering
The ee-files-location-check
do not respect the branch name ordering when trying to find the counterpart CE MR.
As per https://docs.gitlab.com/ee/development/ee_features.html#how-to-name-your-branches it should try to find the canonical branch name first, without any {ce-,-ce}
hints, but in fact it catches the ce-<canonical-branch-name>
.
I have three branches:
- 40781-os-to-ce (CE MR branch)
- ce-40781-os-to-ce (only to have a second pipeline in parallel)
- ee-40781-os-to-ce (EE MR branch)
See job: https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/57375755
=> Running `git ls-remote https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.com/gitlab-org/gitlab-ce.git "*40781-os-to-ce*"`
💪 We found the branch 'ce-40781-os-to-ce' in the https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.com/gitlab-org/gitlab-ce.git repository. We will fetch it.
> git ls-remote ce "*40781-os-to-ce*"
e1f076ecb5c0e92e62ee628b6c18bc8869812b2e refs/heads/40781-os-to-ce # should be used
db5baaab9dcf3309a72308c1191a9fcd24782f00 refs/heads/ce-40781-os-to-ce # used
I know this is kind of an edge case, so we could simply update the documentation to forbid multiple branches or at least output a warning when multiple matching branches are found.