addStableSince adds a stable since note to the release body. Example: > ## Stable (since April 23, 2024)
(date time.Time, body string)
| 269 | // |
| 270 | // > ## Stable (since April 23, 2024) |
| 271 | func addStableSince(date time.Time, body string) string { |
| 272 | // Protect against adding twice. |
| 273 | if strings.Contains(body, "> ## Stable (since") { |
| 274 | return body |
| 275 | } |
| 276 | return fmt.Sprintf("> ## Stable (since %s)\n\n", date.Format("January 02, 2006")) + body |
| 277 | } |
| 278 | |
| 279 | // removeMainlineBlurb removes the mainline blurb from the release body. |
| 280 | // |