Fixed retrieval of repos based on different providers + hook updates
Updated rb hook for gitlab to use production endpoint since it is live. Added gitlab + github repo members of the Project object. RElies on changes that are currently in staging. Changed logic for retrieving projects to contextually change where it looks for repositories based on the request provider.
Signed-off-by: Martin Lowe martin.lowe@eclipse-foundation.org
Merge request reports
Activity
Filter activity
301 294 } 302 295 296 /** 297 * Retrieves projects valid for the current request, or an empty list if no data 298 * or matching project repos could be found. 299 * 300 * @param req the current request 301 * @return list of matching projects for the current request, or an empty list 302 * if none found. 303 */ 304 private List<Project> retrieveProjectsForRequest(ValidationRequest req) { 305 String repoUrl = req.getRepoUrl(); 306 // check for all projects that make use of the given repo 307 @SuppressWarnings("unchecked") 308 Optional<List<Project>> cachedProjects = cache.get("projects", () -> projects.getProject(), 309 (Class<List<Project>>) (Object) List.class); 301 294 } 302 295 296 /** 297 * Retrieves projects valid for the current request, or an empty list if no data 298 * or matching project repos could be found. 299 * 300 * @param req the current request 301 * @return list of matching projects for the current request, or an empty list 302 * if none found. 303 */ 304 private List<Project> retrieveProjectsForRequest(ValidationRequest req) { 305 String repoUrl = req.getRepoUrl(); 306 // check for all projects that make use of the given repo 307 @SuppressWarnings("unchecked") 308 Optional<List<Project>> cachedProjects = cache.get("projects", () -> projects.getProject(), 309 (Class<List<Project>>) (Object) List.class);
Please register or sign in to reply