in src/main/java/org/apache/sling/cli/impl/nexus/RepositoryService.java [100:110]
public StagingRepository find(int stagingRepositoryId) throws IOException {
return this.withStagingRepositories(reader -> {
Gson gson = new Gson();
return gson.fromJson(reader, StagingRepositories.class).getData().stream()
.filter(r -> r.getType() == Status.closed)
.filter(r -> r.getRepositoryId().startsWith(REPOSITORY_PREFIX))
.filter(r -> r.getRepositoryId().endsWith("-" + stagingRepositoryId))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("No repository found with id " + stagingRepositoryId));
});
}