A Discord bot that tracks GitHub repositories and posts real-time activity updates to your server using a polling-based system.
- 🔔 Commit notifications – Get notified on every new push
- 🔀 Pull Request tracking – Open, closed, and merged PRs
- 🐛 Issue tracking – New and updated issues
- 🚀 Release announcements – Never miss a new release
- 📊 Repository stats – Overview of your repo's activity
- 🏆 Contributor leaderboard – See who's contributing the most
- Node.js v18 or higher
- A Discord Application & Bot
- A GitHub account (and optionally a GitHub token for higher API rate limits)
git clone https://github.com/4u1e/github-activity-bot.git
cd github-activity-botnpm installCopy the example and fill in your values:
cp .env.example .env| Variable | Description |
|---|---|
TOKEN |
Your Discord bot token |
CLIENT_ID |
Your Discord application's client ID |
npm run deploynpm startsrc/
├── commands/
│ ├── contributors.js
│ ├── info.js
│ ├── remove.js
│ ├── setup.js
│ └── stats.js
├── data/
│ └── guilds.json
├── events/
│ ├── interactionCreate.js
│ └── ready.js
├── github/
│ ├── api.js
│ ├── commits.js
│ ├── issues.js
│ ├── poller.js
│ ├── prs.js
│ └── releases.js
├── handlers/
│ ├── commandHandler.js
│ └── eventHandler.js
└── utils/
├── embeds.js
├── storage.js
├── config.js
├── deploy.js
└── index.js
The bot polls GitHub every 60 seconds by default. You can change this in src/utils/config.js:
export default {
pollInterval: 60000, // milliseconds
githubApi: "https://api.github.com"
};A Dockerfile and compose.yml are included for containerized deployment.
docker compose up -d| Command | Description |
|---|---|
/setup |
Link a GitHub repository to a channel |
/remove |
Remove a tracked repository |
/stats |
Show stats for a tracked repository |
/contributors |
Display the contributor leaderboard |
/info |
Show bot info and tracked repositories |
Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.
This project is licensed under the MIT License – see the LICENSE file for details.