MCPcopy Create free account
hub / github.com/commonhaus/foundation / findRepositoriesWithCLA

Method findRepositoriesWithCLA

templates/panda/PolicyPanda.java:416–438  ·  view source on GitHub ↗
(List<GHRepository> repos)

Source from the content-addressed store, hash-verified

414 }
415
416 private ArrayNode findRepositoriesWithCLA(List<GHRepository> repos) {
417 ArrayNode reposWithCLA = yamlMapper.createArrayNode();
418
419 for (GHRepository repo : repos) {
420 try {
421 // Look for CLA files with various naming patterns
422 GHContent cla = findFileInRepo(repo, ".*(?:cla|contributor|agreement).*");
423 if (cla != null) {
424 ObjectNode claInfo = yamlMapper.createObjectNode()
425 .put("repository", repo.getName())
426 .put("url", repo.getHtmlUrl().toString())
427 .put("tool", "... (EasyCLA, CLA Assistant, etc.)")
428 .put("storage", "... (e.g. cla-assistant database, etc.)")
429 .put("manager", "... (who manages the CLA process?)")
430 .put("notes", "CLA detected.\nFill in the details. Any notes for future you can go here");
431 reposWithCLA.add(claInfo);
432 }
433 } catch (Exception e) {
434 log.warning("Error checking CLA for " + repo.getName() + ": " + e.getMessage());
435 }
436 }
437 return reposWithCLA;
438 }
439
440 private void runOrgSettingsReport(GHOrganization org) throws IOException {
441 log.info("🌳 Creating a listing of organization and repository settings");

Callers 1

runAssetDiscoveryMethod · 0.95

Calls 1

findFileInRepoMethod · 0.80

Tested by

no test coverage detected