Skip to content

Commit

Permalink
Merge pull request #133 from mcanoy/project-tree
Browse files Browse the repository at this point in the history
Only look for the status.json at root
  • Loading branch information
mcanoy authored Jun 8, 2021
2 parents 223f712 + 275535b commit 0b8e9f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private Status getProjectStatusFile(String customerName, String engagementName)
public Optional<Status> getProjectStatus(String customerName, String engagementName) {

List<ProjectTreeNode> nodes = projectService
.getProjectTree(GitLabPathUtils.getValidPath(engagementPathPrefix, customerName, engagementName));
.getProjectTree(GitLabPathUtils.getValidPath(engagementPathPrefix, customerName, engagementName), false);

// find status file node or throw 404
List<ProjectTreeNode> status = nodes.stream().filter(node -> STATUS_FILE.equals(node.getName()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ public Optional<Project> transferProject(Integer projectId, Integer newGroupId)

}

public List<ProjectTreeNode> getProjectTree(String projectId) {
public List<ProjectTreeNode> getProjectTree(String projectId, boolean recursive) {

Response response = null;
PagedResults<ProjectTreeNode> page = new PagedResults<>(commitPageSize);

while (page.hasMore()) {
response = gitLabService.getProjectTree(projectId, true);
response = gitLabService.getProjectTree(projectId, recursive);
page.update(response, new GenericType<List<ProjectTreeNode>>() {
});
}
Expand Down

0 comments on commit 0b8e9f9

Please sign in to comment.