This small program connects to a YouTrack instance, fetches notifications, and sends them to Discord. It can also create new YouTrack issues directly from a slash command.
It serves as a submission for the Jetbrains application process.
To whoever reads this: I hope I understood the assignment correctly, especially the notification fetching part. I couldn't find any documentation on the YouTrack API, so I had to rely on a stackoverflow answer.
You can find the deliverables in the submission_deliverables-folder.
-
Clone the repository
git clone git@github.com:nopjar/youtrack-messenger-bridge.git cd youtrack-messenger-bridge -
Add configuration Create a
.envfile (or export environment variables):DISCORD_TOKEN=<discord-bot-token> DISCORD_CHANNEL_ID=<channel-id> YOUTRACK_TOKEN=<your-token> YOUTRACK_URL=https://your-domain.youtrack.cloud YOUTRACK_PROJECT=<0-0>
-
Startup Database Use docker compose to start the database:
docker-compose up -d
-
Run
./gradlew bootRun
- Periodically polls YouTrack for new notifications
- Converts HTML notifications to Markdown
- Well, not really. It just removes HTML tags, because out of an HTML snippet, you can't reliably extract the content to form a good Markdown.
- Key Problem: There is no documented API for retrieving notifications.
- Sends issue details:
ID,Title,Status,Description, andLink - Supports creating new issues from messenger commands
Messenger command example:
/create-issue <title: Add login validation to API> <description: Some description>
→ Creates a new issue in YouTrack with that summary.
MIT