Getting branch name from environment variables to deal with how build machine close the git repo