Beispiel #1
0
        protected override bool TryGetOverrideMessage(GitCommit commit, [NotNullWhen(true)] out string?message)
        {
            var notes = m_Repository
                        .GetNotes(commit.Id)
                        .Where(n => n.Namespace == m_Configuration.MessageOverrides.GitNotesNamespace);

            if (notes.Any())
            {
                m_Logger.LogInformation($"Commit message for commit '{commit.Id}' was overridden through git-notes. Using message from git-notes instead of commit message.");
                message = notes.Single().Message;
                return(true);
            }

            message = default;
            return(false);
        }