@@ -27,7 +27,7 @@ class ChangelogGenerator {
2727
2828 private static final Logger log = LoggerFactory .getLogger (ChangelogGenerator .class );
2929
30- static final String INPUT_FILE = "changelog.md" ;
30+ static final String DEFAULT_OUTPUT_FILE = "changelog.md" ;
3131
3232 static final String GITHUB_API_URL = "https://api.github.com" ;
3333
@@ -42,7 +42,7 @@ class ChangelogGenerator {
4242 public ChangelogGenerator (ProcessRunner processRunner ) {
4343 this .githubApi = GITHUB_API_URL ;
4444 this .githubToken = Input .getGhToken ();
45- this .outputFile = new File (INPUT_FILE );
45+ this .outputFile = new File (DEFAULT_OUTPUT_FILE );
4646 this .processRunner = processRunner ;
4747 }
4848
@@ -56,9 +56,27 @@ public ChangelogGenerator(ProcessRunner processRunner) {
5656
5757 File generateChangelog (String githubRefName , String githubOrgRepo , File jarPath ) {
5858 log .info ("Generating changelog..." );
59- processRunner .run (getJava (), "-jar" , jarPath .getAbsolutePath (), githubRefName .replace ("v" , "" ),
60- outputFile .getAbsolutePath (), "--changelog.repository=" + githubOrgRepo ,
61- "--github.api-url=" + githubApi , "--github.token=" + githubToken );
59+ // @formatter:off
60+ processRunner .run (getJava (), "-jar" , jarPath .getAbsolutePath (),
61+ githubRefName .replace ("v" , "" ),
62+ outputFile .getAbsolutePath (),
63+ "--changelog.repository=" + githubOrgRepo ,
64+ "--changelog.contributors.exclude.names=shakuzen,jonatan-ivanov" ,
65+ "--changelog.sections[0].title=:warning: Noteworthy" ,
66+ "--changelog.sections[0].labels=release notes" ,
67+ "--changelog.sections[1].title=:star: New Features" ,
68+ "--changelog.sections[1].labels=enhancement" ,
69+ "--changelog.sections[2].title=:lady_beetle: Bug Fixes" ,
70+ "--changelog.sections[2].labels=bug, regression" ,
71+ "--changelog.sections[3].title=:notebook_with_decorative_cover: Documentation" ,
72+ "--changelog.sections[3].labels=doc-update, documentation" ,
73+ "--changelog.sections[4].title=:hammer: Dependency Upgrades" ,
74+ "--changelog.sections[4].labels=dependency-upgrade, dependencies" ,
75+ // "--changelog.sections[5].title=:memo: Tasks",
76+ // "--changelog.sections[5].labels=task",
77+ "--github.api-url=" + githubApi ,
78+ "--github.token=" + githubToken );
79+ // @formatter:on
6280 return outputFile ;
6381 }
6482
0 commit comments