public void Print() { var repoPath = PathToRepositoryProvider.Path; if (LocalRepoIsValid.IsValidRepository(repoPath)) { using var repo = RepositoryCheckouts.Get(repoPath.Value); _logger.Information("Sha {Sha}", repo.Repository.CurrentSha); } }
public ErrorResponse Prep(CancellationToken cancellationToken) { var localRepoPath = CheckOrClone.Check( RegistryUrlProvider.Url, RegistryFolderProvider.RegistryFolder, cancellationToken); if (localRepoPath.Failed) { return(localRepoPath); } using var repoCheckout = RepositoryCheckouts.Get(localRepoPath.Value.Local); var repo = repoCheckout.Repository; return(ResetToLatestMain.TryReset(repo)); }