Add autodetect branch name and role name