This workflow automatically posts commit information to Discord whenever you push code to GitHub.
✅ Posts commit details to Discord on every push
✅ Shows commit message, author, branch, and file changes
✅ Displays stats (files changed, insertions, deletions)
✅ Provides clickable link to the commit on GitHub
✅ Formatted with emojis and colors for easy reading
- Go to your Discord server
- Create a new channel (e.g.,
#github-notifications) - Make sure the bot will have permission to post messages
- In Discord, right-click on the channel where you want notifications
- Click "Edit Channel"
- Go to "Integrations" → "Webhooks"
- Click "New Webhook"
- Give it a name (e.g., "GitHub Bot")
- Copy the Webhook URL
- Go to your GitHub repository: https://github.com/Project-XI/Project-EL
- Click Settings (top right)
- Go to Secrets and variables → Actions
- Click New repository secret
- Name:
DISCORD_WEBHOOK_URL - Paste the webhook URL you copied from Discord
- Click Add secret
- Make a commit and push to
main,develop, ormasterbranch - The GitHub Action will automatically run
- You should see a formatted message in your Discord channel within 30 seconds
The bot posts messages that look like:
📝 New Commit Pushed
"Refine ORACLE analysis and testing UI"
🔗 Commit: c2c1c7d
👤 Author: rajkoli
🌿 Branch: main
📊 Stats: Files: 18 | +2442 | -271
📄 Changed Files:
• Docs/index.html
• backend/.env.example
• backend/src/agents/oracle.py
• backend/src/main.py
• backend/src/cli.py
You can edit .github/workflows/discord-notify.yml to:
- Change which branches trigger notifications (currently:
main,develop,master) - Modify the message format and colors
- Add additional fields or remove some
- Change the webhook timeout or retry logic
| Issue | Solution |
|---|---|
| No message in Discord | Check that DISCORD_WEBHOOK_URL secret is set in GitHub Settings |
| Webhook URL error | Make sure the webhook URL is correct and not expired |
| Action fails | Check the GitHub Actions logs: Go to repo → Actions → find the failed run |
| Webhook URL shows as empty | The secret may have been corrupted; delete and recreate it |
Once set up, every commit push will automatically notify your team on Discord! 🚀