class GitManager {

    public List<Revision> getPipelineRevisions(Pipeline pipeline)
            throws GitClientException {
        GitlabClient client = this.getGitlabClientForPipeline(pipeline);
        List<Revision> tags = client.getRepositoryRevisions().stream()
                .map(i -> new Revision(i.getName(), i.getMessage(),
                        parseGitDate(i.getCommit().getAuthoredDate()), i.getCommit().getId(),
                        i.getCommit().getAuthorName(), i.getCommit().getAuthorEmail()))
                .sorted(Comparator.comparing(Revision::getCreatedDate).reversed())
                .collect(Collectors.toList());
        List<Revision> revisions = new ArrayList<>(tags.size());
        addDraftRevision(client, revisions, tags);
        CollectionUtils.addAll(revisions, tags);
        return revisions;
    }

}