MCPcopy Create free account
hub / github.com/google/go-github / genReleaseNotes

Function genReleaseNotes

tools/gen-release-notes/main.go:53–63  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

51}
52
53func genReleaseNotes(text string) string {
54 allLines := splitIntoPRs(text)
55 fullBreakingLines, fullNonBreakingLines := splitBreakingLines(allLines)
56 refBreakingLines, refNonBreakingLines := genRefLines(fullBreakingLines, fullNonBreakingLines)
57
58 return fmt.Sprintf(releaseNotesFmt,
59 strings.Join(fullBreakingLines, "\n"),
60 strings.Join(fullNonBreakingLines, "\n"),
61 strings.Join(refBreakingLines, "\n"),
62 strings.Join(refNonBreakingLines, "\n"))
63}
64
65func splitIntoPRs(text string) []string {
66 parts := strings.Split("\n"+text, "\ncommit ")

Callers 1

mainFunction · 0.85

Calls 3

splitIntoPRsFunction · 0.85
splitBreakingLinesFunction · 0.85
genRefLinesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…