Move target repository check to repository class

Because the process uses attributes of repository. Method should be
defined in object that has data used in the method.