Fixed release notes generation; fixes #53

This commit is contained in:
Marcin Grzejszczak
2017-10-25 10:25:58 +02:00
parent 8860ef330e
commit 3aa9d7b4c7
3 changed files with 5 additions and 3 deletions

View File

@@ -96,7 +96,9 @@ class GithubMilestones {
try {
URL url = foundMilestoneUrl(foundMilestone);
log.info("Found a matching milestone with issues URL [{}]", url);
return url.toString().replace("https://api.github.com/repos", "https://github.com") + "?closed=1";
return url.toString()
.replace("https://api.github.com/repos", "https://github.com")
.replace("milestones", "milestone")+ "?closed=1";
}
catch (IOException e) {
throw new IllegalStateException(e);

View File

@@ -2,5 +2,5 @@
{{ date }}
{{#each projects}} - {{name}} `{{version}}` ([issues]({{ closedMilestoneUrl }}))
{{#each projects}} - {{name}} `{{version}}` {{#if closedMilestoneUrl}}([issues]({{ closedMilestoneUrl }})){{/if}}
{{/each}}

View File

@@ -118,7 +118,7 @@ public class GithubMilestonesTests {
String url = milestones.milestoneUrl(gaSleuthProject());
then(url).isEqualTo("https://github.com/spring-cloud/spring-cloud-sleuth/milestones/33?closed=1");
then(url).isEqualTo("https://github.com/spring-cloud/spring-cloud-sleuth/milestone/33?closed=1");
}
@Test