Changed add_repo function