示例#1
0
        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);
            }
        }
示例#2
0
        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));
        }