Class MessageTemplates
java.lang.Object
io.github.jbastgen.stemma.app.git.MessageTemplates
Fills commit and merge message templates. A template is plain text with placeholders in braces:
{branch} the current branch {type} its prefix: feature, bugfix, hotfix, … (before the first /)
{name} the rest of the branch name {ticket} an issue key found in the branch name, e.g. ABC-123
{repo} the repository's name {date} today, as 2026-11-17
{source} merge: the branch merged {target} merge: the branch merged into
Unknown placeholders stay as they are. When a placeholder at the start of a line is empty, the separator after it
disappears with it, and empty [] or () are removed, so "[{ticket}] {name}" gives
"login" on a branch without an issue key. This is also the place where generated messages will plug in later.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat a template can refer to. -
Field Summary
FieldsModifier and TypeFieldDescriptionThe placeholders with a one-line explanation, in the order the settings page lists them. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringrender(String template, MessageTemplates.Context context) The rendered template; empty if the template is blank.
-
Field Details
-
PLACEHOLDERS
The placeholders with a one-line explanation, in the order the settings page lists them.
-
-
Method Details
-
render
The rendered template; empty if the template is blank. Line breaks are kept.
-