I’m encountring again a problem and a challange regarding the sourcebranch name in the pipeline when merging.
according to some other posts on the forum it seems inpossible.
the most usefull one was this: https://forum.gitlab.com/t/how-to-get-source-branch-name-when-source-branch-merge-to-destination-branch/59363/2
I have tried:
but both return me ‘main’.
I need the name because i’m doing som thing behind the scenes where I use amend.
Currently everything is working in a standard commit or branch pipeline, but it doesn’t work when I do a merge.
What I actually need is all the commits from the source branch (preferably the commit id’s)
I’m trying to do that with git log --no-merges sourcebranchname ^main
If there is an alternative like getting the commits and writing them to a file, i’m all ears.
besides that is there another option? I could use the same git log command on the main branch but i think that would be very difficult.