Create project repository only when it not exists

This commit is contained in:
Douglas Barbosa Alexandre 2017-04-25 15:58:17 -03:00
parent 000a723d84
commit 39ab842bc2

View file

@ -61,7 +61,7 @@ module Github
def fetch_repository
begin
project.create_repository
project.create_repository unless project.repository.exists?
project.repository.add_remote('github', "https://{options.fetch(:token)}@github.com/#{repo}.git")
project.repository.set_remote_as_mirror('github')
project.repository.fetch_remote('github', forced: true)