timols / java-gitlab-api

A wrapper for the Gitlab API written in Java
Apache License 2.0
387 stars 317 forks source link

Is there anyway of filtering forked projects from the originals? #262

Open aram535 opened 7 years ago

aram535 commented 7 years ago

Hi,

I need to get a list of the projects from gitlab and exclude any "forks".

This was working for a while ... but it seems to an invalid test of a "forked" project.

List<GitlabProject> projects = api.getAllProjects(); List<GitlabProjects> filtered = projects.stream().filter(p -> p.getOwner() != null).collect(Collectors.toList());

Any other filters I could use to filter out the forked projects?