request for an additional supported variable in merge request templates

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Hello,

We run a combination of pipelines; GitLab and Jenkins.

For the Jenkins pipelines, we want to provide a link to Jenkins to ease pipeline kickoff. Currently, in the “Default description template for merge requests” we provide developers a link to a multi-branch pipeline with a template of

/assign me

---

### Jenkins Builds: [Full Runs](http://jenkins.mycompany.com:8080/job/product/job/mbpipeline/)

This works well, however, once at the multi-branch pipeline page developers must search for and then enter the branch specific page before kickoff is possible. This manual step of searching and selecting is undesirable by all.

The following attempt to link directly to the branch page was unsuccessful

/assign me

---

### Jenkins Builds: [Full Runs](http://jenkins.mycompany.com:8080/job/product/job/mbpipeline/%{source_branch})

This is unsuccessful because our branch naming convention includes slashes ('/') like this example branch name “bugfix/issue-1234-branch-name”.

Slashes are problematic because Jenkins uses slashes to delineate it's hierarchal tree in URLs. And so, when branch names are referenced in Jenkins URLs, branch name slashes are (double?) URL encoded to ‘%252F’. Where '/' is '%2F' and '%' is '%25'.

It would be incredibly helpful to have an additional supported variable in merge request templates - %{source_branch_jenkins} - where the variable has the Jenkins URL encoded version of the %{source_branch} var. This would allow a direct link to the specific branch where kickoff, examination, etc. are immediately available.

It's possible this enhancement would be beneficial to many of your customers!

Please add %{source_branch_jenkins} to supported variables in merge request templates where the variable represents a jenkins compatible URL branch name.

Edited Sep 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading