Configure protected branches for access to protected variables
Click Settings, then Repository. Scroll down, and expand Protected branches.
Enter your Jira issue ID prefix and a *.
The Jira issue IDs are like IM-5, and IM-6 in this example; The prefix is IM-.
Enter IM-*, and click Protect.
You will see mainline, and IM-* as protected branches.