in src/main/java/com/spotify/github/v3/clients/PullRequestClient.java [425:440]
public CompletableFuture<Reader> diff(final long prNumber) {
final String path = String.format(PR_NUMBER_TEMPLATE, owner, repo, prNumber);
final Map<String, String> extraHeaders =
ImmutableMap.of(HttpHeaders.ACCEPT, "application/vnd.github.diff");
log.debug("Fetching pull diff from " + path);
return github
.request(path, extraHeaders)
.thenApply(
response -> {
final var body = response.body();
if (isNull(body)) {
return Reader.nullReader();
}
return new InputStreamReader(body);
});
}