Factor using Repository#path_to_repo

Created by: cirosantilli

Function already existed, we only need to use it.

合并请求报告