Fixed the wrong milestone URLs in release notes

This commit is contained in:
Marcin Grzejszczak
2017-10-24 11:30:32 +02:00
parent b0ea26366d
commit 8e4d0690a0
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -111,14 +111,14 @@ public class GithubMilestonesTests {
@Override URL foundMilestoneUrl(Milestone.Smart milestone)
throws IOException {
return new URL("http://foo.com/bar");
return new URL("https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/milestones/33");
}
};
repo.milestones().create("0.2.0.RELEASE");
String url = milestones.milestoneUrl(gaSleuthProject());
then(url).isEqualTo("http://foo.com/bar");
then(url).isEqualTo("https://github.com/spring-cloud/spring-cloud-sleuth/milestones/33?closed=1");
}
@Test