# cloudpipelines-project-crawler **Repository Path**: mirrors_spring-cloud/cloudpipelines-project-crawler ## Basic Information - **Project Name**: cloudpipelines-project-crawler - **Description**: Abstraction over fetching data from repository management services - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-18 - **Last Updated**: 2025-08-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cloudpipelines-project-crawler is no longer actively maintained by VMware, Inc. :jdkversion: 1.8 :org: CloudPipelines :repo: project-crawler :branch: master image::https://circleci.com/gh/{org}/{repo}/tree/{branch}.svg?style=svg["CircleCI", link="https://circleci.com/gh/{org}/{repo}/tree/{branch}"] image::https://codecov.io/gh/{org}/{repo}/branch/{branch}/graph/badge.svg["codecov", link="https://codecov.io/gh/{org}/{repo}"] :toc: left :toclevels: 8 :nofooter: == Project Crawler Small project to iterate over and fetch files from different repository management tools like Github, Gitlab, BitBucket == Examples Fetch the repositories for an org and download a file from it ```groovy ProjectCrawler crawler = new ProjectCrawler(OptionsBuilder.builder() // basing the root URL we can resolve the type of repo (e.g. https://gitlab.com) .rootUrl(urlRoot) // username to access the API .username(username) // password to access the API .password(password) // token to access the API .token(token) // repository type (GITHUB, BITBUCKET, GITLAB, OTHER) .repository(repoType) .build()); // get the repos from the org List repositories = crawler.repositories(org); repositories.each { Repository repo -> // fetch a file from the repository String file = crawler.fileContent(org, repo.name, repo.requestedBranch, "path/to/file.txt") } ``` For BitBucket: * remember to pass the URL to the API (e.g. `https://api.bitbucket.org`). * we support only the 2.0 API. == Adding your own implementation If you're using some other tool than Github, Gitlab or Bitbucket you can write an implementation that integrates with that tool. We're using the standard, Java `ServiceLoader` mechanism to load any extensions and the interface to implement is `RepositoryManagementBuilder`. To do that just create a file called `META-INF/io.cloudpipelines.projectcrawler.RepositoryManagementBuilder` that is accessible on classpath. The file should contain a line with fully qualified name of your implementation class (e.g. `com.example.TestRepositoryManagementBuilder`)