private void outputFormatted()

in src/main/java/org/apache/sling/tooling/lc/LaunchpadComparer.java [137:178]


    private void outputFormatted(Map.Entry<ArtifactKey, VersionChange> e) {

        ArtifactKey artifact = e.getKey();
        VersionChange versionChange = e.getValue();

        if (isMarkdown()) {
            System.out.format(
                    "* `%s`:**`%s`** %s -> %s%n",
                    artifact.getGroupId(), artifact.getArtifactId(), versionChange.getFrom(), versionChange.getTo());
        } else {
            System.out.format(
                    "    %-30s : %-55s : %s -> %s%n",
                    artifact.getGroupId(), artifact.getArtifactId(), versionChange.getFrom(), versionChange.getTo());
        }

        if (!artifact.getGroupId().equals("org.apache.sling")) {
            return;
        }

        GitChangeLogFinder git = new GitChangeLogFinder(slingRepoCheckout);

        try {
            List<String> issueKeys =
                    git.getChanges(artifact.getArtifactId(), versionChange.getFrom(), versionChange.getTo()).stream()
                            .map(m -> m.split(System.lineSeparator())[0])
                            .map(LaunchpadComparer::toJiraKey)
                            .filter(k -> k != null)
                            .collect(Collectors.toList());

            List<Issue> issues = new IssueFinder().findIssues(issueKeys);
            if (isMarkdown()) {
                issues.forEach(i -> System.out.format(
                        "    * [%s %s](https://issues.apache.org/jira/browse/%s) (%s)%n",
                        i.getKey(), i.getSummary(), i.getKey(), i.getIssueType()));
            } else {
                issues.forEach(i -> System.out.format("        %-10s - %s%n", i.getKey(), i.getSummary()));
            }

        } catch (GitAPIException | IOException e1) {
            System.err.println("Failed retrieving changes : " + e1.getMessage());
        }
    }