Package io.github.jbastgen.stemma.app.ai
Class Changelog
java.lang.Object
io.github.jbastgen.stemma.app.ai.Changelog
A changelog in the Keep a Changelog style (feature 5): reading the proposal of the AI, merging it into
CHANGELOG.md under Unreleased without touching existing entries, and showing what the merge adds.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildPrompt(String template, String repo, List<String> commitLines) The prompt:{repo},{commits}(one line each, with labels) and{sections}.static StringThe diff as text: changed lines with+, and two lines of context around them; blank text when nothing changes.static StringPuts the entries under## [Unreleased]of the changelog: into the section of that name when there is one (after its last bullet, skipping bullets that are already there), else as a new section.Reads### Sectionheadings with-bullets (a bullet may continue on indented lines).static StringThe entries as the text of a release: with## titleon top when there is a title, else only the sections.
-
Field Details
-
TEMPLATE_NAME
- See Also:
-
FILE
- See Also:
-
-
Method Details
-
buildPrompt
The prompt:{repo},{commits}(one line each, with labels) and{sections}. -
parse
Reads### Sectionheadings with-bullets (a bullet may continue on indented lines). Text outside a section is ignored; sections without bullets are dropped; the same bullet twice is kept once. -
render
The entries as the text of a release: with## titleon top when there is a title, else only the sections. -
merge
Puts the entries under## [Unreleased]of the changelog: into the section of that name when there is one (after its last bullet, skipping bullets that are already there), else as a new section. Everything else stays byte for byte; without an Unreleased heading one is added before the first release. -
diffText
The diff as text: changed lines with+, and two lines of context around them; blank text when nothing changes.
-