Expose base commit SHA in pipelines for merge requests
When running pipelines on merge requests, it would be helpful to know the exact range of commits to be merged. Right now, CI_COMMIT_SHA
gives access to the topmost commit but it's hard to determine how many commits belong to this merge request. This information is readily available from the API as base_commit_sha
when querying the MR diff versions.
Note that this is not about CI_MERGE_REQUEST_TARGET_BRANCH_SHA
(only available for merged results) because the target branch could have advanced. Essentially, I'd be interested in the merge base for all commits part of the MR.
Edited by Jonas Hahnfeld