Skip to content

checks: fix merge base detection

Jiri Benc requested to merge jbencrh/documentation:fix-merge-base into main

We should not assume the current branch is branched off main. This is especially not true if the user rebases their changes by doing git fetch origin ; git rebase origin/main.

Check origin/main instead. This should be always the same or newer than what the user branched off (newer is okay; we're running git merge-base to detect the actual branch point).

By doing that, we no longer have to create the main branch when running under CI. We still need to fetch the branch, though. Change the CI detection logic to be more clear why we're running the fetch.

Reported-by: Jerry Snitselaar jsnitsel@redhat.com Signed-off-by: Jiri Benc jbenc@redhat.com

Merge request reports