File tree 1 file changed +16
-5
lines changed
assets/chezmoi.io/docs/reference
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Release history
2
- {{- range $release := gitHubListReleases "twpayne/chezmoi" }}
2
+
3
+ {{- $releases := gitHubListReleases "twpayne/chezmoi" }}
4
+ {{- $lastReleaseIndex := sub (len $releases) 1 }}
5
+ {{- range $index, $release := $releases }}
3
6
4
7
## [{{ $release.Name | trimPrefix "v" }}]({{ $release.HTMLURL }}) ({{ $release.PublishedAt | gitHubTimestampFormat "2006-01-02" }})
5
8
6
9
{{ $release.Body
7
- | replaceAllRegex "(?m)^## What's Changed$" ""
8
- | replaceAllRegex "(?m)^## Changelog\\r?$" ""
9
- | replaceAllRegex "(?m)^## (New Contributors)\\r?$" "$1\n"
10
- | replaceAllRegex "\\*\\*(Full Changelog)\\*\\*" "$1"
10
+ | replaceAllRegex "(?m)^#+ (Changelog\\r?|What's Changed)$" ""
11
+ | replaceAllRegex "(?m)^#+ (.*)\\r?$" "\n\n$1\n"
12
+ | replaceAllRegex "\\*\\*(Full Changelog)\\*\\*.*\n" ""
11
13
| replaceAllRegex "(https://github\\.com/twpayne/chezmoi/compare/(\\S+))" "[`$2`]($1)"
12
14
| replaceAllRegex "@(\\S+)" "[**$0**](https://github.com/$1)"
13
15
| replaceAllRegex "pull request #(\\d+)" "pull request https://github.com/twpayne/chezmoi/pull/$1"
16
18
| replaceAllRegex "(?m)^([0-9a-f]{7,})" "* $1"
17
19
| replaceAllRegex "(?m)^\\* ([0-9a-f]{7,})" "* [`$1`](https://github.com/twpayne/chezmoi/commit/$1)"
18
20
| replaceAllRegex "\\r\\n" "\\n"
21
+ | trim
22
+ | default "Internal changes only"
19
23
}}
24
+
25
+ {{- if ne $index $lastReleaseIndex }}
26
+ {{- $prevRelease := index $releases (add $index 1) }}
27
+
28
+ Full changelog: [{{ $prevRelease.Name }}...{{ $release.Name }}](https://github.com/twpayne/chezmoi/compare/{{ $prevRelease.Name }}...{{ $release.Name }})
29
+ {{- end }}
30
+
20
31
{{- end }}
You can’t perform that action at this time.
0 commit comments