java.lang.Object
com.marginallyclever.ro3.apps.plugins.GithubFetcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteFileFromCache(String path) static booleandoesFileExist(String path) fetchRobotProperties(String repositoryUrl) Fetches the robot.properties file from the main branch of the given repository.fetchRobotProperties(String repositoryUrl, String version) Fetches the robot.properties file from the given repository and branch.Fetches the list of tags from the given repository.Check for the "all_robots.txt" file in the local cache.static StringgetAPIFileFromRepo(URL url, String file) Get the contents of the readme file from a github repository.static StringgetLocalPath(String owner, String repoName, String tag) Gets the local path for the given repository.static voidinstallRepository(String githubRepositoryUrl, String tag) Installs the given repository and tag.lookForLocallyInstalledTags(String githubUrl) Fetches the list of locally-installed tags for the given repository.
-
Field Details
-
ALL_ROBOTS_PATH
-
-
Constructor Details
-
GithubFetcher
public GithubFetcher()
-
-
Method Details
-
fetchRobotProperties
public static Map<String,String> fetchRobotProperties(String repositoryUrl, String version) throws IOException Fetches the robot.properties file from the given repository and branch.- Parameters:
repositoryUrl- The URL of the repository to fetch from.version- The branch to fetch from.- Returns:
- A map of the properties.
- Throws:
IOException- If the properties file could not be fetched.
-
fetchRobotProperties
Fetches the robot.properties file from the main branch of the given repository.- Parameters:
repositoryUrl- The URL of the repository to fetch from.- Returns:
- A map of the properties.
- Throws:
IOException- If the properties file could not be fetched.
-
fetchTags
-
lookForLocallyInstalledTags
-
getLocalPath
-
installRepository
-
getAPIFileFromRepo
Get the contents of the readme file from a github repository.- Parameters:
url- The URL of the repository.file- The name of the file to fetch.- Returns:
- The contents of the file.
- Throws:
IOException- If the file could not be fetched.
-
getAllRobotsFile
-
deleteFileFromCache
-
doesFileExist
-