-
Notifications
You must be signed in to change notification settings - Fork 154
YouTrack bot
As an SDK usage example we have releazed the YouTrack bot. It can send notifications about tracker's events (adding new issues or changes with existing issues) via VK messages.
We use Callback API for the commands handling. Community access token is used for the requests processing.
Primarily you need to get community access token. You can do this at the community management page or via OAuth flow. Please read our documentation for the further information.
Then you need to create gradle.properties file in vk-java-sdk/examples/youtrack-bot with the following settings:
#YouTrack Settings
ytHost — YouTrack server host;
ytLogin — YouTrack bot login;
ytPassword — YouTrack bot password.
#Http client settings
httpKeyStoreType — type of keystore;
httpKeyStorePath — absolute path to keystore;
httpKeyStorePassword — password for keystore;
httpKeyPassword — password for key in keystore;
httpTrustStoreType — type of truststore;
httpTrustStorePath — absolute path to truststore;
httpTrustStorePassword — password for truststore.
#VK settings
vkGroupId — community ID;
vkGroupToken — community access token.
#Webserver settings
serverHost — server host for callback api;
serverPort — server port for callback api.
#Bot settings
dataPath — absolute path to data directory.
Run the following commands:
gradle clean build
to build the project;
gradle :examples:youtrack-bot run
to run the bot.
Join your bot community. It will send you the following instructions. You can also start using the bot by sending help command.
login [yt_login] — to log in;
logout — to log out;
config — to show notifications configuration;
setconfig [name] [on|off] — to configure notifications;
mine [count] — assigned to me tasks;
search [filter] — to search issues by the query;
uptime — to uptime information about bot;
help — to get information about commands.