Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 25, 2025

Implements automatic Telegram notifications when new DAppNode releases are created, addressing the requirement to notify users via a designated chat when releases are launched.

What's Changed

🚀 New Telegram Notification System

  • Automatic notifications: Sends messages to a configured Telegram chat after successful releases
  • Rich messaging: Formatted messages with emojis, release version, and direct GitHub release URLs
  • Robust validation: Input validation for release versions and URLs with proper error handling

📁 Files Added/Modified

New Scripts:

  • scripts/telegram_notify.sh - Core script that handles Telegram API communication
  • test/test_telegram_notify.sh - Comprehensive test suite validating all functionality

Workflow Integration:

  • .github/workflows/release.yml - Added Telegram notification step that runs after successful releases
  • .github/workflows/test.yml - Added CI integration to run Telegram tests automatically

Documentation:

  • README.md - Added notification information to the releases section
  • installer_instructions/INSTALLER.md - Detailed setup guide for bot configuration

🔧 How It Works

When the "Pre-release" GitHub Action completes successfully:

  1. The workflow executes telegram_notify.sh with the release version and GitHub URL
  2. Script validates inputs and sends a professionally formatted message via Telegram Bot API
  3. Message includes release version, direct download link, and relevant hashtags

Example message format:

🚀 New DAppNode Release Available!

📦 Version: v0.2.51
🔗 Download: https://github.com/dappnode/DAppNode/releases/tag/v0.2.51

The latest DAppNode release is now available with updated core packages and improvements.

#DAppNode #Release #Decentralized

⚙️ Configuration Required

Repository administrators need to configure two secrets in GitHub Settings → Secrets:

  • TELEGRAM_BOT_TOKEN: Bot token from @Botfather
  • TELEGRAM_CHAT_ID: Target chat/channel ID

✅ Testing

Includes comprehensive test coverage with CI integration:

  • Argument validation (missing, invalid formats)
  • URL format validation
  • Environment variable checks
  • Mock API calls for end-to-end testing
  • Automated CI testing: Tests run automatically on pull requests and pushes via dedicated CI job

All tests pass and the system is ready for production use once secrets are configured.

🎯 Benefits

  • Immediate notifications: Community gets instant updates about new releases
  • Professional presentation: Well-formatted messages with all necessary information
  • Zero maintenance: Fully automated with the existing release workflow
  • Reliable: Full error handling and validation ensures robust operation
  • Continuous validation: CI integration ensures the notification system remains functional
Original prompt

Send a telegram message via a bot to de dessigned chat when a new release is launched.
Message must contain the url of the relase


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Send a telegram message via a bot to de dessigned chat when a new release is launched. Message must contain the url of the relase Add Telegram bot notifications for new DAppNode releases Sep 25, 2025
Copilot finished work on behalf of hcastc00 September 25, 2025 14:28
@Copilot Copilot AI requested a review from hcastc00 September 25, 2025 14:28
@hcastc00
Copy link

Telegram test isn't being run @copilot

Copy link
Contributor Author

Copilot AI commented Sep 25, 2025

Telegram test isn't being run @copilot

Fixed! I've added the Telegram test to the CI workflow in .github/workflows/test.yml. The test now runs as a separate job called "test Telegram notification" and will execute automatically on pull requests and pushes. Commit c78b313

Copilot finished work on behalf of hcastc00 September 25, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants