support lowercase branch name as %{branch} and original branch name as %{BRANCH}