Skip to content

Commit e8b75d1

Browse files
committed
Gradle: patchPluginXml: fix formatting of <change-notes>
Commit 1082881 (Gradle: patchPluginXml: link to the full changelog, 2023-07-05) added section "See also" to <change-notes> generated by Gradle task `patchPluginXml`. I failed to test the change. The asterisk in front of the `[Full changelog](...)` causes the list item to be nested one level too deep. Function `plus()` keeps only the `extraItems` passed into the constructor of `Changelog.Item` (and `summary`, but only if left-hand side `Item` doesn't have one already). So we technically could keep the String "* ", as its value was just ignored by `plus()`.[1] Remove unnecessary asterisks of Markdown list syntax that I've added without understanding how the classes Changelog and Changelog.Item work. While we're here, mention introduction of the "See also" section with the link to the full changelog in `CHANGELOG.md`. [1] value of property `itemPrefix` in class Changelog.Item is completely unused as of Gradle Changelog Plugin 2.1.1, but that's a separate issue
1 parent 785f15b commit e8b75d1

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Added
88
- Installation instructions for alpha versions have been added to the
99
[README](https://github.com/rybak/intellij-copy-commit-reference/blob/main/README.md)
10+
- "What's New" tab for the plugin now includes a link to the full changelog
1011

1112
### Changed
1213
- Example of a commit reference has been added to plugin's public description

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ tasks {
9595
changeNotes = properties("pluginVersion").map { pluginVersion ->
9696
"<h2>${pluginVersion}</h2>\n" + with(changelog) {
9797
val extraItems = mapOf(
98-
"See also" to setOf("* [Full changelog](https://github.com/rybak/intellij-copy-commit-reference/blob/main/CHANGELOG.md)")
98+
"See also" to setOf("[Full changelog](https://github.com/rybak/intellij-copy-commit-reference/blob/main/CHANGELOG.md)")
9999
)
100100
renderItem(
101101
(getOrNull(pluginVersion) ?: getUnreleased())
102102
.withHeader(false)
103103
.withEmptySections(false)
104-
.plus(Changelog.Item("", "", "", false, extraItems, "* ", "")),
104+
.plus(Changelog.Item("", "", "", false, extraItems, "", "")),
105105
Changelog.OutputType.HTML
106106
)
107107
}

0 commit comments

Comments
 (0)