From 1800ecd31c46bf10784a326aaeaed95b7926e0b5 Mon Sep 17 00:00:00 2001 From: bakito Date: Fri, 29 Jun 2018 00:20:01 +0200 Subject: [PATCH] correct syntax for generated readme, update changelog --- CHANGELOG.md | 14 ++++---- README.md | 34 +++++++++---------- .../plugins/badge/readme/DescribeStepTag.java | 5 +-- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6660494..a8dce23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,18 @@ # Change Log -## [Unreleased](https://github.com/jenkinsci/badge-plugin/tree/HEAD) - -[Full Changelog](https://github.com/jenkinsci/badge-plugin/compare/badge-1.4...HEAD) - -## [badge-1.4](https://github.com/jenkinsci/badge-plugin/tree/badge-1.4) (2018-04-04) -[Full Changelog](https://github.com/jenkinsci/badge-plugin/compare/badge-1.3...badge-1.4) +## [badge-1.5](https://github.com/jenkinsci/badge-plugin/tree/badge-1.5) (2018-06-18) +[Full Changelog](https://github.com/jenkinsci/badge-plugin/compare/badge-1.4...badge-1.5) **Closed issues:** - No page found 'badge.jelly' for class com.jenkinsci.plugins.badge.action.BadgeSummaryAction [\#6](https://github.com/jenkinsci/badge-plugin/issues/6) +**Merged pull requests:** + +- fix one char typo border vs. order [\#9](https://github.com/jenkinsci/badge-plugin/pull/9) ([balihb](https://github.com/balihb)) + +## [badge-1.4](https://github.com/jenkinsci/badge-plugin/tree/badge-1.4) (2018-04-04) +[Full Changelog](https://github.com/jenkinsci/badge-plugin/compare/badge-1.3...badge-1.4) **Merged pull requests:** diff --git a/README.md b/README.md index d53ca59..de5a8f2 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This method allows to add build badge icons. * icon: The icon for this badge * text: The text for this badge */ -addBadge(icon, text) +addBadge(icon: , text: ) /** * all params @@ -36,7 +36,7 @@ addBadge(icon, text) * id: (optional) The id for this badge. This id can be used to selectively delete badges. * link: (optional) The link to be added to this badge */ -addBadge(icon, text, id, link) +addBadge(icon: , text: , id: , link: ) // addInfoBadge @@ -47,7 +47,7 @@ addBadge(icon, text, id, link) * * text: The info text for this badge */ -addInfoBadge(text) +addInfoBadge(text: ) /** * all params @@ -56,7 +56,7 @@ addInfoBadge(text) * id: (optional) The id for this badge. This id can be used to selectively delete badges. * link: (optional) The link to be added to this badge */ -addInfoBadge(text, id, link) +addInfoBadge(text: , id: , link: ) // addWarningBadge @@ -67,7 +67,7 @@ addInfoBadge(text, id, link) * * text: The text for this warning badge */ -addWarningBadge(text) +addWarningBadge(text: ) /** * all params @@ -76,7 +76,7 @@ addWarningBadge(text) * id: (optional) The id for this badge. This id can be used to selectively delete badges. * link: (optional) The link to be added to this badge */ -addWarningBadge(text, id, link) +addWarningBadge(text: , id: , link: ) // addErrorBadge @@ -87,7 +87,7 @@ addWarningBadge(text, id, link) * * text: The text for this error badge */ -addErrorBadge(text) +addErrorBadge(text: ) /** * all params @@ -96,7 +96,7 @@ addErrorBadge(text) * id: (optional) The id for this badge. This id can be used to selectively delete badges. * link: (optional) The link to be added to this badge */ -addErrorBadge(text, id, link) +addErrorBadge(text: , id: , link: ) ``` @@ -122,7 +122,7 @@ removeBadges() * * id: (optional) The id for this badge. This id can be used to selectively delete badges. */ -removeBadges(id) +removeBadges(id: ) ``` @@ -141,7 +141,7 @@ Puts a badge with custom html * * html: The html content to be used for this badge */ -addHtmlBadge(html) +addHtmlBadge(html: ) /** * all params @@ -149,7 +149,7 @@ addHtmlBadge(html) * html: The html content to be used for this badge * id: (optional) The id for this badge. This id can be used to selectively delete badges. */ -addHtmlBadge(html, id) +addHtmlBadge(html: , id: ) ``` ## removeHtmlBadges @@ -173,7 +173,7 @@ removeHtmlBadges() * * id: (optional) The id for this badge. This id can be used to selectively delete badges. */ -removeHtmlBadges(id) +removeHtmlBadges(id: ) ``` @@ -194,7 +194,7 @@ Puts a badge with a short text * * text: The text to add fot this badge */ -addShortText(text) +addShortText(text: ) /** * all params @@ -202,11 +202,11 @@ addShortText(text) * text: The text to add fot this badge * background: (optional) The background-color for this short text * border: (optional) The border width for this short text - * borderColor: (optional) The border color for this short text + * borderColor: (optional) The order color for this short text * color: (optional) The color for this short text * link: (optional) The link for this short text */ -addShortText(text, background, border, borderColor, color, link) +addShortText(text: , background: , border: , borderColor: , color: , link: ) ``` @@ -229,7 +229,7 @@ Puts a badge with a short text * * icon: The icon for this summary */ -createSummary(icon) +createSummary(icon: ) /** * all params @@ -238,7 +238,7 @@ createSummary(icon) * id: (optional) The id for this badge. This id can be used to selectively delete badges. * text: (optional) The title text for this summary */ -createSummary(icon, id, text) +createSummary(icon: , id: , text: ) def summary = createSummary(icon) diff --git a/src/test/java/com/jenkinsci/plugins/badge/readme/DescribeStepTag.java b/src/test/java/com/jenkinsci/plugins/badge/readme/DescribeStepTag.java index 5b566ee..1c49375 100644 --- a/src/test/java/com/jenkinsci/plugins/badge/readme/DescribeStepTag.java +++ b/src/test/java/com/jenkinsci/plugins/badge/readme/DescribeStepTag.java @@ -75,7 +75,8 @@ public String interpret(TagNode tagNode, JinjavaInterpreter jinjavaInterpreter) stream(constructorParams).forEach(sb::append); sb.append(" */\n"); - sb.append(functionName).append("(").append(stream(constructorParams).map(MethodParameter::getName) + sb.append(functionName).append("(") + .append(stream(constructorParams).map(p -> p.getName() + ": <" + p.getName() + ">") .collect(joining(", "))).append(")\n\n"); @@ -86,7 +87,7 @@ public String interpret(TagNode tagNode, JinjavaInterpreter jinjavaInterpreter) sb.append(" */\n"); sb.append(functionName).append("(").append(concat(stream(constructorParams), stream(optionalParameterNames)) - .map(MethodParameter::getName).collect(joining(", "))).append(")\n"); + .map(p -> p.getName() + ": <" + p.getName() + ">").collect(joining(", "))).append(")\n"); } } catch (Exception e) {