determine the branch name automatically