Checked out branch on GitLab CI is un-intuitive
Steps to reproduce
- Create a new GitLab project
- Perform a git based operation on branch using
$CI_COMMIT_BRANCH
. We get an error like this:
-- https://gitlab.com/tkuah/change_files/-/jobs/3647921580
Observations:
- Seeing
Checking out acbaaf42 as main...
, I expect the branch to bemain
but as you can see in above screenshot, it is detached. Is this expected ? - If this detached is expected, can we improve the above message ?
- Could we also document this somewhere in https://docs.gitlab.com/ee/ci/pipelines/ ?
Note: I am unsure if this is a typebug in GitLab but will start with bug for now