Skip to content

Commit 95221c7

Browse files
committed
Defaulting ignoreCommitsWithoutIssue #9
1 parent 11eacd4 commit 95221c7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/se/bjurr/gitchangelog/plugin/GitChangelogMojo.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public class GitChangelogMojo extends AbstractMojo {
116116
private String jiraUsername;
117117

118118
@Parameter(property = "ignoreCommitsWithoutIssue", required = false)
119-
private boolean ignoreCommitsWithoutIssue;
119+
private Boolean ignoreCommitsWithoutIssue;
120120

121121
@Parameter(property = "customIssues", required = false)
122122
private List<CustomIssue> customIssues;
@@ -175,8 +175,10 @@ public void execute() throws MojoExecutionException {
175175
if (isSupplied(noIssueName)) {
176176
builder.withNoIssueName(noIssueName);
177177
}
178-
builder.withIgnoreCommitsWithoutIssue(ignoreCommitsWithoutIssue);
179-
for (CustomIssue customIssue : customIssues) {
178+
if (ignoreCommitsWithoutIssue != null) {
179+
builder.withIgnoreCommitsWithoutIssue(ignoreCommitsWithoutIssue);
180+
}
181+
for (final CustomIssue customIssue : customIssues) {
180182
builder.withCustomIssue(
181183
customIssue.getName(),
182184
customIssue.getPattern(),
@@ -239,7 +241,7 @@ public void execute() throws MojoExecutionException {
239241
getLog().info("# Created: " + mediaWikiUrl + "/index.php/" + mediaWikiTitle);
240242
getLog().info("#");
241243
}
242-
} catch (Exception e) {
244+
} catch (final Exception e) {
243245
getLog().error("GitChangelog", e);
244246
}
245247
}

0 commit comments

Comments
 (0)