/// <inheritdoc/>
        public FormattedReleaseNotes Format(string?header, ReleaseNotes releaseNotes)
        {
            var builder = new StringBuilder();

            var headingLevel = _headingLevel;

            if (!string.IsNullOrEmpty(header))
            {
                builder
                .AppendLF($"{new string('#', headingLevel)} {header}")
                .AppendLF();

                headingLevel++;
            }

            headingLevel = Math.Max(headingLevel, 2);

            foreach (var label in releaseNotes.Labels)
            {
                builder
                .AppendLF($"{new string('#', headingLevel)} {label.DisplayName}")
                .AppendLF();

                foreach (var issue in releaseNotes.IssuesByLabel[label.Name])
                {
                    builder
                    .Append("- ")
                    .Append($"[#{issue.Number}]({issue.Url}) {issue.Title}");

                    if (issue.Contributor != null)
                    {
                        builder
                        .AppendLF($" ([@{issue.Contributor.Login}]({issue.Contributor.Url}))");
                    }
                    else
                    {
                        builder.AppendLF();
                    }
                }
            }

            return(FormattedReleaseNotes.FromString(builder.AppendLF().ToString()));
        }
        /// <inheritdoc/>
        public FormattedReleaseNotes Format(string? header, ReleaseNotes releaseNotes)
        {
            var builder = new StringBuilder();

            if (!string.IsNullOrEmpty(header))
            {
                builder
                    .AppendLF(header!)
                    .AppendLF();
            }

            foreach (var label in releaseNotes.Labels)
            {
                builder
                    .AppendLF($"{label.DisplayName}:");

                foreach (var issue in releaseNotes.IssuesByLabel[label.Name])
                {
                    builder
                        .Append("- ")
                        .Append($"#{issue.Number} {issue.Title}");

                    if (issue.Contributor != null)
                    {
                        builder
                            .AppendLF($" (@{issue.Contributor.Login})");
                    }
                    else
                    {
                        builder.AppendLF();
                    }
                }
            }

            return FormattedReleaseNotes.FromString(builder.ToString());
        }