Repository.sync now returns foreman task info or JSON response.