Skip to content
Closed
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: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ Some [helpers](/src/main/java/se/bjurr/gitchangelog/api/helpers) are implemented
Loop each part of the URL.

```hbs
{{#eachUrlPart .}}
{{@index}}: {{.}}
{{/eachUrlPart}}
https://gitlab.com/{{#eachUrlPart .}}{{#if @first}}{{else}}{{.}}/{{/if}}{{/eachUrlPart}}
```

### `ifReleaseTag <Tag>`
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#Sat Jan 18 07:59:25 CET 2025
#Sat Jan 25 19:50:49 CST 2025
description='Library for parsing report files from static code analysis'
group=se.bjurr.gitchangelog
sourceCompatibility=17
targetCompatibility=17
version=2.5.0
version=2.5.1
2 changes: 2 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 @@ -28,6 +28,7 @@
import com.github.jknack.handlebars.Options.Buffer;
import com.github.jknack.handlebars.helper.EachHelper;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
Expand Down Expand Up @@ -242,6 +243,7 @@ public static Map<String, Helper<?>> getAll() {
helpers.put(
"eachUrlPart",
(final Changelog changelog, final Options options) -> {
Collections.reverse(changelog.getUrlParts());
return each(options, changelog.getUrlParts());
});
return helpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ template:
ownerName: {{ownerName}}
repoName: {{repoName}}
urlParts: {{urlParts}}
{{#eachUrlPart .}}
{{@index}}: {{.}}
{{/eachUrlPart}}
https://github.com/{{#eachUrlPart .}}{{#if @first}}{{else}}{{.}}/{{/if}}{{/eachUrlPart}}

---------------------------------------------

Expand Down Expand Up @@ -72,10 +70,7 @@ changelog:
ownerName: tomasbjerre
repoName: git-changelog-lib
urlParts: [git-changelog-lib, tomasbjerre, git@github.com]
0: git-changelog-lib
1: tomasbjerre
2: git@github.com

https://github.com/tomasbjerre/git-changelog-lib/

---------------------------------------------

Expand Down
4 changes: 1 addition & 3 deletions src/test/resources/templatetest/testEachUrlPart.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ownerName: {{ownerName}}
repoName: {{repoName}}
urlParts: {{urlParts}}
{{#eachUrlPart .}}
{{@index}}: {{.}}
{{/eachUrlPart}}
https://github.com/{{#eachUrlPart .}}{{#if @first}}{{else}}{{.}}/{{/if}}{{/eachUrlPart}}
Loading