Factor using Repository#path_to_repo
Merge pull request #8258 from cirosantilli/factor-repo-path

Factor using Repository#path_to_repo