From e8b75d1ca9ffc3849d0f0356a253b776c5c318cd Mon Sep 17 00:00:00 2001 From: Andrei Rybak Date: Fri, 7 Jul 2023 22:47:36 +0200 Subject: [PATCH] Gradle: patchPluginXml: fix formatting of Commit 1082881 (Gradle: patchPluginXml: link to the full changelog, 2023-07-05) added section "See also" to 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 --- CHANGELOG.md | 1 + build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10d3494..bd9d738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Added - Installation instructions for alpha versions have been added to the [README](https://github.com/rybak/intellij-copy-commit-reference/blob/main/README.md) +- "What's New" tab for the plugin now includes a link to the full changelog ### Changed - Example of a commit reference has been added to plugin's public description diff --git a/build.gradle.kts b/build.gradle.kts index a8e1fe3..aee42a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -95,13 +95,13 @@ tasks { changeNotes = properties("pluginVersion").map { pluginVersion -> "

${pluginVersion}

\n" + with(changelog) { val extraItems = mapOf( - "See also" to setOf("* [Full changelog](https://github.com/rybak/intellij-copy-commit-reference/blob/main/CHANGELOG.md)") + "See also" to setOf("[Full changelog](https://github.com/rybak/intellij-copy-commit-reference/blob/main/CHANGELOG.md)") ) renderItem( (getOrNull(pluginVersion) ?: getUnreleased()) .withHeader(false) .withEmptySections(false) - .plus(Changelog.Item("", "", "", false, extraItems, "* ", "")), + .plus(Changelog.Item("", "", "", false, extraItems, "", "")), Changelog.OutputType.HTML ) }