Skip to content

Commit 6363483

Browse files
feat: Added footer.
The config now contains a new 'footer' param. If set the changelog will add the value at the end of the changelog. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
1 parent b859af5 commit 6363483

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ the command was invoked.
3535
The following configuration values are available:
3636

3737
`Header` - The header of the changelog, defaults to '# Change Log'
38+
`Footer` - The footer of the changelog, defaults to ''
3839
`GroupBreakingChanges` - If any breaking changes should have their own section
3940
in the changelog, defaults to true.
4041
`GroupBreakingHeader` - Header for breaking changes, defautls to '## Breaking changes'

cc-gen/Commands/GenerateCommand.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ string ParseType(string type)
122122
var formatter = new ScribanFormatter(Config.LoadConfiguration());
123123
var str = formatter.FormatCommits(grouped.OrderBy(c => c.Key));
124124

125-
125+
if (!string.IsNullOrWhiteSpace(config.Footer))
126+
{
127+
str += " " + Environment.NewLine + config.Footer;
128+
}
126129
Console.Write(str);
127130
return str;
128131
}

cc-gen/Config.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Jitesoft.CcGen;
99
public class Config
1010
{
1111
public string Header { get; set; } = "# Change Log";
12+
public string Footer { get; set; } = "";
1213

1314
public bool GroupBreakingChanges { get; set; } = true;
1415
public string GroupedBreakingHeader { get; set; } = "## Breaking changes";

0 commit comments

Comments
 (0)