Closed akorchyn closed 1 month ago
@coderabbitai review
The recent updates introduce Telegram integration into the bot, allowing it to send messages to a specified chat. This involves adding environment variables for Telegram configuration, updating message templates, incorporating the reqwest
library, and creating a new telegram
module. The TelegramSubscriber
struct handles tracing events and sends notifications to Telegram. Additionally, the bot's main setup now includes this new subscriber for enhanced logging capabilities.
File | Change Summary |
---|---|
.env.example |
Added TELEGRAM_TOKEN and TELEGRAM_CHAT_ID variables. |
Messages.toml |
Updated variable name from pr-author-username to pr_author_username in message templates. |
bot/Cargo.toml |
Added reqwest dependency with workspace = true . |
bot/src/api/mod.rs |
Introduced a new telegram module. |
bot/src/api/telegram.rs |
Added TelegramSubscriber struct for handling tracing events and sending Telegram messages. |
bot/src/main.rs |
Integrated telegram module and TelegramSubscriber into bot's logging setup. |
sequenceDiagram
participant Bot as Bot
participant TelegramSubscriber as TelegramSubscriber
participant TelegramAPI as Telegram API
Bot->>TelegramSubscriber: Initialize with bot_token and chat_id
TelegramSubscriber->>TelegramAPI: Send message on event
TelegramAPI-->>TelegramSubscriber: Acknowledge receipt
TelegramSubscriber-->>Bot: Log event sent confirmation
In the land of code, where bots reside, A new feature now takes stride. Telegram whispers in the night, Tracing logs with all its might. With tokens and chats, messages flow, Our bot's new powers now aglow. Hooray for updates, cheers all around, In the digital realm, new friends are found!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors: - Tag us inside your pull requests - Wait for the maintainer to review and score your pull request - Check out your position in the [Leaderboard](https://github.com/race-of-sloths) - Keep weekly and monthly streaks to reach higher positions - Boast your contributions with a dynamic picture of your [Profile](https://github.com/race-of-sloths/u/akorchyn) For maintainers: - Score pull requests that participate in the Race of Sloths - Engage contributors with fair scoring and fast responses so they keep their streaks - Promote the Race to the point where the Race starts promoting you - Grow the community of your contributors Feel free to check [our website](https://github.com/race-of-sloths) for additional details!
[!IMPORTANT] We're waiting for maintainer to score this pull request with
@race-of-sloths score [0,1,2,3,5,8,13]
command
@race-of-sloths score 3
Let's keep it fair! 👍
[!IMPORTANT] This pull request is a part of the Race of Sloths and has not been scored yet. Scoring will close in 24 hours! 🕰️
Your contribution is much appreciated with a final score of 0. Check out the updates in your profile! 🎊
@race-of-sloths
Summary by CodeRabbit
New Features
Improvements
Logging