Get the name of the source branch after an MR is merged

Hey :wave:

I have a Pipeline job that needs to run only after an MR has been merged to a certain branch (let’s assume it’s master).

This job is supposed to make an API call to send the name of the merged source branch.

The problem I’m encountering is that CI_MERGE_REQUEST_SOURCE_BRANCH_NAME will not be available on the Pipeline that runs right after the merge (since it’s not a merge request pipeline).

Is there a way (env var) to tell what was the branch that was just merged into master?

Many thanks in advance y’all!