$ echo "Source branch:$CI_MERGE_REQUEST_BRANCH"
Source branch:
$ echo "Target branch:$CI_COMMIT_REF_NAME"
Target branch:develop
$ echo "CI_MERGE_REQUEST_DIFF_BASE_SHA:$CI_COMMIT_BEFORE_SHA"
CI_MERGE_REQUEST_DIFF_BASE_SHA:48f01e3243wfd232dx345x445634
$ echo "CI_COMMIT_BRANCH:$CI_COMMIT_BRANCH"
CI_COMMIT_BRANCH:develop
$ echo "Current branch:$CI_COMMIT_REF_NAME"
Current branch:develop
I need to merge the source branch name and target branch name when merging from the source branch to the target branch. These variables cannot get names from the source branch name and target branch name. My master branch(target branch) is the develop branch I need to get the source branch(an example is the bugfix branch) when merging. I tried to these variables but was unable to find any outputs using these variables.
Are there any methods to get variable outputs when merging from source to target branch?