private static string FormatReleaseNoteTitle(SemanticReleaseItemSummary item) { if (item.Highlight) { return($"`{item.Title}`"); } var escapedTitle = EscapeMarkdown(item.Title); return(EmphasiseSquareBraces(escapedTitle)); }
private string FormatReleaseItem(SemanticReleaseItemSummary item) { var pullRequestTitle = FormatReleaseNoteTitle(item); var pullRequestUrl = $@"[{_programArgs.PullRequestProvider.PrefixedPullRequest(item.Number)}]({_programArgs.PullRequestProvider.PullRequestUrl(item.Number)})"; var pullRequestNumber = item.Number; var pullRequestCreatedAt = item.CreatedAt.ToString(_programArgs.ReleaseNoteDateFormat); var pullRequestMergedAt = item.MergedAt?.ToString(_programArgs.ReleaseNoteDateFormat); var pullRequestAuthor = item.Author; var pullRequestAuthorUrl = $@"[{item.Author}]({item.AuthorUrl})"; return(string.Format($@"- {_programArgs.ReleaseNoteFormat}", pullRequestTitle, pullRequestUrl, pullRequestNumber, pullRequestCreatedAt, pullRequestMergedAt, pullRequestAuthor, pullRequestAuthorUrl)); }