From d397a023e20f6fea73b8d19854d4130eceb2fd92 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 18 Dec 2025 09:07:22 -0800 Subject: [PATCH] Avoid formatting release note if already formatted If the link is already included in the release note, treat it as formatted. This allows the release note to control the formatting when wanting to add the link to the PR above a more detailed description. Signed-off-by: Derek McGowan --- github.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/github.go b/github.go index f6b702e..1c6cb1d 100644 --- a/github.go +++ b/github.go @@ -121,7 +121,11 @@ func (p *githubChangeProcessor) prChange(c *change, info pullRequestInfo, pr int c.Formatted = fmt.Sprintf("%s ([%s#%d](%s))", c.Title, p.linkName, pr, c.Link) releaseNote := getReleaseNote(info.Body) if releaseNote != "" { - c.Highlight = fmt.Sprintf("%s ([%s#%d](%s))", releaseNote, p.linkName, pr, c.Link) + if strings.Contains(releaseNote, c.Link) { + c.Highlight = releaseNote + } else { + c.Highlight = fmt.Sprintf("%s ([%s#%d](%s))", releaseNote, p.linkName, pr, c.Link) + } } else { c.Highlight = c.Formatted }