Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#Wed Oct 16 22:16:00 CEST 2024
#Wed Jan 15 14:18:26 CST 2025
description='Library for parsing report files from static code analysis'
group=se.bjurr.gitchangelog
sourceCompatibility=17
targetCompatibility=17
version=2.4.1
version=2.4.2
7 changes: 7 additions & 0 deletions src/main/java/se/bjurr/gitchangelog/api/helpers/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Map;
import java.util.TreeMap;
import java.util.stream.Collectors;
import se.bjurr.gitchangelog.api.model.Changelog;
import se.bjurr.gitchangelog.api.model.Commit;
import se.bjurr.gitchangelog.api.model.Issue;
import se.bjurr.gitchangelog.api.model.Tag;
Expand Down Expand Up @@ -237,6 +238,12 @@ public static Map<String, Helper<?>> getAll() {
(final Footer footer, final Options options) -> {
return conditional(options, !footer.value.trim().isEmpty());
});

helpers.put(
"eachUrlPart",
(final Changelog changelog, final Options options) -> {
return each(options, changelog.getUrlParts());
});
return helpers;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Changelog of {{repoName}}.
### Dependency updates

{{#commits}}
{{#ifCommitType . type="feat"}}
{{#ifCommitScope . scope="utils"}}
{{#ifCommitType . type="chore"}}
{{#ifCommitScope . scope="deps"}}
- {{{commitDescription .}}} ([{{subString hash 0 5}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}}) {{#eachCommitRefs .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitRefs}} {{#eachCommitFixes .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitFixes}}
{{/ifCommitScope}}
{{/ifCommitType}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Changelog of {{repoName}}.
### Dependency updates

{{#commits}}
{{#ifCommitType . type="feat"}}
{{#ifCommitScope . scope="utils"}}
{{#ifCommitType . type="chore"}}
{{#ifCommitScope . scope="deps"}}
- {{{commitDescription .}}} ([{{subString hash 0 5}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}}) {{#eachCommitRefs .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitRefs}} {{#eachCommitFixes .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitFixes}}
{{/ifCommitScope}}
{{/ifCommitType}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Changelog of {{repoName}}.
### Dependency updates

{{#commits}}
{{#ifCommitType . type="feat"}}
{{#ifCommitScope . scope="utils"}}
{{#ifCommitType . type="chore"}}
{{#ifCommitScope . scope="deps"}}
- {{{commitDescription .}}} ([{{subString hash 0 5}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}}) {{#eachCommitRefs .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitRefs}} {{#eachCommitFixes .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitFixes}}
{{/ifCommitScope}}
{{/ifCommitType}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Changelog of {{repoName}}.
### Dependency updates

{{#commits}}
{{#ifCommitType . type="feat"}}
{{#ifCommitScope . scope="utils"}}
{{#ifCommitType . type="chore"}}
{{#ifCommitScope . scope="deps"}}
- {{{commitDescription .}}} ([{{subString hash 0 5}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}}) {{#eachCommitRefs .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitRefs}} {{#eachCommitFixes .}}{{#ifMatches . "^#[0-9]+"}} [{{.}}](https://github.com/{{ownerName}}/{{repoName}}/issues/{{subString . 1}}) {{/ifMatches}}{{/eachCommitFixes}}
{{/ifCommitScope}}
{{/ifCommitType}}
Expand Down
7 changes: 7 additions & 0 deletions src/test/java/se/bjurr/gitchangelog/api/TemplatesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ public void testUrlParts() throws Exception {
ApprovalsWrapper.verify(given);
}

@Test
public void testEachUrlPart() throws Exception {
final GitChangelogApi given =
this.baseBuilder.withTemplatePath("templatetest/testEachUrlPart.mustache");
ApprovalsWrapper.verify(given);
}

@Test
public void testAuthorsCommits() throws Exception {
final GitChangelogApi given =
Expand Down
Loading
Loading