|
1 | 1 | package com.capitalone.dashboard.collector; |
2 | 2 |
|
3 | 3 |
|
4 | | -import com.capitalone.dashboard.client.RestOperationsSupplier; |
5 | 4 | import com.capitalone.dashboard.misc.HygieiaException; |
6 | 5 | import com.capitalone.dashboard.model.BaseModel; |
7 | 6 | import com.capitalone.dashboard.model.CollectionError; |
|
18 | 17 | import com.capitalone.dashboard.repository.GitRequestRepository; |
19 | 18 | import com.capitalone.dashboard.util.CommitPullMatcher; |
20 | 19 | import com.capitalone.dashboard.util.GithubRepoMatcher; |
21 | | -import com.google.common.collect.Lists; |
22 | 20 | import org.apache.commons.collections.CollectionUtils; |
23 | 21 | import org.apache.commons.collections.MapUtils; |
24 | 22 | import org.apache.commons.lang3.StringUtils; |
|
35 | 33 | import org.springframework.web.client.RestClientException; |
36 | 34 |
|
37 | 35 | import java.net.MalformedURLException; |
38 | | - |
39 | 36 | import java.util.ArrayList; |
40 | 37 | import java.util.Collection; |
41 | 38 | import java.util.Comparator; |
@@ -103,6 +100,7 @@ public Collector getCollector() { |
103 | 100 | allOptions.put(GitHubRepo.USER_ID, ""); |
104 | 101 | allOptions.put(GitHubRepo.PASSWORD, ""); |
105 | 102 | allOptions.put(GitHubRepo.PERSONAL_ACCESS_TOKEN, ""); |
| 103 | + allOptions.put(GitHubRepo.TYPE, ""); |
106 | 104 | protoType.setAllFields(allOptions); |
107 | 105 |
|
108 | 106 | Map<String, Object> uniqueOptions = new HashMap<>(); |
@@ -164,7 +162,7 @@ public void collect(Collector collector){ |
164 | 162 | clean(collector); |
165 | 163 | List<GitHubRepo> enabledRepos = enabledRepos(collector); |
166 | 164 | if(gitHubSettings.getSearchCriteria() != null){ |
167 | | - String searchCriteria[] = gitHubSettings.getSearchCriteria().split(Pattern.quote("|")); |
| 165 | + String[] searchCriteria = gitHubSettings.getSearchCriteria().split(Pattern.quote("|")); |
168 | 166 | if(REPO_NAME.equalsIgnoreCase(searchCriteria[0])){ |
169 | 167 | enabledRepos = enabledRepos.stream().filter(repo -> GithubRepoMatcher.repoNameMatcher(repo.getRepoUrl(),searchCriteria[1])).collect(Collectors.toList()); |
170 | 168 | }else if(ORG_NAME.equalsIgnoreCase(searchCriteria[0])) { |
|
0 commit comments