Yes, could make sense to factor this code into a GetDeployerFromUrl helper and use it in more places. Though in some cases, we may need to override it if it doesn't yield an optimal string.