How to get the refs/branch name in the post-receive hook?

Hi,

First, thank you for this great product. It allow us in my company to smoothly migrate from svn to git.

So we’re using subgit to synchronize a subversion repository with git (the repo is on a self-hosted gitlab). It works fine except that I’m unable to make it trigger the gitlab CI/CD pipeline when we commit from svn. But the svn commit are correctly translated to git commit.

I searched on the forum and found this thread: GitLab CI/CD pipeline not ran after committing to SVN - #3 by Julien_Jemine

So the idea would be to trigger the pipeline from the user-post-receive hook.

Unfortunately when I try the hook is exectued but there is no inputs. The only thing I can read is the last fetched revision through the environment variable SVN_LAST_FETCHED_REVISION.

But I need the branch name/refs to trigger the pipeline via the gitlab API.

So my question: is there a way to get the branch name related to the revision number ?