public async Task CheckAsync(Repository repository)
        {
            Log.Debug("Checking branch tips ...");
            var branches = await gitBranchService.GetBranchesAsync(CancellationToken.None);

            if (branches.IsFaulted)
            {
                return;
            }

            IReadOnlyDictionary <CommitSha, string> commitIds = GetSingleBranchTipCommits(repository, branches.Value);

            foreach (var pair in commitIds)
            {
                BranchName branchName = pair.Value;
                if (branchName.StartsWith(Origin))
                {
                    branchName = branchName.Substring(Origin.Length);
                }

                await gitCommitBranchNameService.SetCommitBranchNameAsync(pair.Key, branchName);
            }

            if (gitSettings.IsRemoteDisabled)
            {
                Log.Info("IsRemoteDisabled = true");
                return;
            }

            await gitCommitBranchNameService.PushNotesAsync(repository.RootCommit.RealCommitSha);
        }
Exemple #2
0
 public Task PushNotesAsync(CommitSha rootId)
 {
     return(gitCommitBranchNameService.PushNotesAsync(rootId));
 }