Make repository URL a property
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2023-01-16 00:41:45 +01:00
parent a28781b806
commit 8b1c1b4d04
3 changed files with 15 additions and 3 deletions

View File

@@ -218,6 +218,16 @@ public class Cache
return propertiesSource.getProperty("bot.version");
}
/**
* Get the bot's source code URL.
*
* @return a String containing the base URL of the repository, including a <b>trailing slash</b>.
*/
public static String getRepositoryUrl() {
String url = propertiesSource.getProperty("repo.base_url");
return url.endsWith("/") ? url : url + "/";
}
/**
* Get the bot's global color.
*