Skip to content

Commit 628c21b

Browse files
committed
#2019 - Prepare changelog.
1 parent 3dfb11d commit 628c21b

File tree

2 files changed

+54
-45
lines changed

2 files changed

+54
-45
lines changed

src/main/resources/changelog.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Spring HATEOAS Changelog
22
========================
33

4+
Changes in version 2.0.5 (2023-07-14)
5+
----------------------------------------
6+
- #2018 - Switch to UriComponentsBuilder.fromUri(…).
7+
- #2013 - Upgrade to Spring Framework 6.0.11.
8+
- #2008 - Upgrade to Slf4j 2.0.7.
9+
- #2006 - Upgrade to Reactor 2022.0.9.
10+
- #2002 - Upgrade to Lombok 1.18.28.
11+
- #1991 - Upgrade to Logback 1.4.8.
12+
413
Changes in version 2.0.4 (2023-05-11)
514
----------------------------------------
615
- #1972 - Upgrade to Reactor 2022.0.7.

src/test/java/org/springframework/hateoas/support/ChangelogCreator.java

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -38,66 +38,66 @@
3838
*/
3939
class ChangelogCreator {
4040

41-
private static final int MILESTONE_ID = 117;
42-
private static final String URI_TEMPLATE = "https://api.github.com/repos/spring-projects/spring-hateoas/issues?milestone={id}&state=closed";
41+
private static final int MILESTONE_ID = 119;
42+
private static final String URI_TEMPLATE = "https://api.github.com/repos/spring-projects/spring-hateoas/issues?milestone={id}";
4343

44-
public static void main(String... args) {
44+
public static void main(String... args) {
4545

46-
/*
47-
* If you run into github rate limiting issues, you can always use a Github Personal Token by adding
48-
* {@code .header(HttpHeaders.AUTHORIZATION, "token your-github-token")} to the webClient call.
49-
*/
46+
/*
47+
* If you run into github rate limiting issues, you can always use a Github Personal Token by adding
48+
* {@code .header(HttpHeaders.AUTHORIZATION, "token your-github-token")} to the webClient call.
49+
*/
5050

51-
WebClient webClient = WebClient.create();
51+
WebClient webClient = WebClient.create();
5252

53-
HttpEntity<String> response = webClient //
54-
.get().uri(URI_TEMPLATE, MILESTONE_ID) //
55-
.exchangeToMono(clientResponse -> clientResponse.toEntity(String.class)) //
56-
.block(Duration.ofSeconds(10));
53+
HttpEntity<String> response = webClient //
54+
.get().uri(URI_TEMPLATE, MILESTONE_ID) //
55+
.exchangeToMono(clientResponse -> clientResponse.toEntity(String.class)) //
56+
.block(Duration.ofSeconds(10));
5757

58-
boolean keepChecking = true;
59-
boolean printHeader = true;
58+
boolean keepChecking = true;
59+
boolean printHeader = true;
6060

61-
while (keepChecking) {
61+
while (keepChecking) {
6262

63-
readPage(response.getBody(), printHeader);
64-
printHeader = false;
63+
readPage(response.getBody(), printHeader);
64+
printHeader = false;
6565

66-
List<String> linksInHeader = response.getHeaders().get(HttpHeaders.LINK);
67-
Links links = linksInHeader == null ? Links.NONE : Links.parse(linksInHeader.get(0));
66+
List<String> linksInHeader = response.getHeaders().get(HttpHeaders.LINK);
67+
Links links = linksInHeader == null ? Links.NONE : Links.parse(linksInHeader.get(0));
6868

69-
if (links.getLink(IanaLinkRelations.NEXT).isPresent()) {
69+
if (links.getLink(IanaLinkRelations.NEXT).isPresent()) {
7070

71-
response = webClient //
72-
.get().uri(links.getRequiredLink(IanaLinkRelations.NEXT).expand().getHref()) //
73-
.exchangeToMono(clientResponse -> clientResponse.toEntity(String.class)) //
74-
.block(Duration.ofSeconds(10));
71+
response = webClient //
72+
.get().uri(links.getRequiredLink(IanaLinkRelations.NEXT).expand().getHref()) //
73+
.exchangeToMono(clientResponse -> clientResponse.toEntity(String.class)) //
74+
.block(Duration.ofSeconds(10));
7575

76-
} else {
77-
keepChecking = false;
78-
}
79-
}
80-
}
76+
} else {
77+
keepChecking = false;
78+
}
79+
}
80+
}
8181

82-
private static void readPage(String content, boolean header) {
82+
private static void readPage(String content, boolean header) {
8383

84-
JsonPath titlePath = JsonPath.compile("$[*].title");
85-
JsonPath idPath = JsonPath.compile("$[*].number");
84+
JsonPath titlePath = JsonPath.compile("$[*].title");
85+
JsonPath idPath = JsonPath.compile("$[*].number");
8686

87-
JSONArray titles = titlePath.read(content);
88-
Iterator<Object> ids = ((JSONArray) idPath.read(content)).iterator();
87+
JSONArray titles = titlePath.read(content);
88+
Iterator<Object> ids = ((JSONArray) idPath.read(content)).iterator();
8989

90-
if (header) {
91-
System.out.println(
92-
"Changes in version " + JsonPath.read(content, "$[0].milestone.title") + " (" + LocalDate.now()
93-
+ ")");
94-
System.out.println("----------------------------------------");
95-
}
90+
if (header) {
91+
System.out.println(
92+
"Changes in version " + JsonPath.read(content, "$[0].milestone.title") + " (" + LocalDate.now()
93+
+ ")");
94+
System.out.println("----------------------------------------");
95+
}
9696

97-
for (Object title : titles) {
97+
for (Object title : titles) {
9898

99-
String format = String.format("- #%s - %s", ids.next(), title.toString().replaceAll("`", ""));
100-
System.out.println(format.endsWith(".") ? format : format.concat("."));
101-
}
102-
}
99+
String format = String.format("- #%s - %s", ids.next(), title.toString().replaceAll("`", ""));
100+
System.out.println(format.endsWith(".") ? format : format.concat("."));
101+
}
102+
}
103103
}

0 commit comments

Comments
 (0)