Skip to content

AI-powered GitHub + Slack summarizer for project updates

License

Notifications You must be signed in to change notification settings

avidity/weekly-ai-bot

Repository files navigation

🧠 “What Did We Even Do This Week?” Bot

AI-powered GitHub + Slack summarizer for project updates


🚀 Overview

This bot connects to GitHub, reads Pull Requests and related tasks, and uses Gemini AI to generate short, human-friendly summaries of what changed — then automatically posts the result to Slack.

Perfect for weekly updates, client meeting prep, or just keeping track of progress without digging through commits.


🧩 Features

  • 🔍 Fetch PRs, commits, and file changes from a repository within a given period
  • 🧠 Summarize using Gemini AI (via API or CLI)
  • 💬 Post result to Slack automatically
  • 🧰 Run locally, in Docker, or via GitHub Actions
  • ⚙️ Accepts a repository URL and an optional period in days (defaults to 7)

⚙️ Setup

  1. Clone the repo

    git clone https://github.com/avidity/weekly-ai-bot.git
    cd github-weekly-ai-bot
  2. Install dependencies

    npm install
  3. Configure environment

    Copy .env.example to .env and fill in:

    GITHUB_TOKEN=<your_token>
    SLACK_WEBHOOK_URL=<your_slack_webhook>
    GEMINI_API_KEY=<your_gemini_api_key>
    

🐳 Run

  • In Docker

    docker-compose up --build
  • Local dev mode

    npm run dev

🏃‍♀️ Usage

There are two ways to run the bot:

1. CLI

Run the bot directly from your terminal with a repository URL and an optional period in days:

node src/index.js --repo https://github.com/acme/project --period 7

2. Slack Command

The bot can be triggered via a Slack slash command.

Command:

/summary <period_in_days> <repository_url>

Example:

/summary 7 https://github.com/avidity/weekly-ai-bot

This will trigger the bot to generate a summary for the last 7 days and post it to the configured Slack channel.


🔌 Tech Stack

Layer Tool
Runtime Node.js (v20+)
AI Engine Gemini API / CLI
API Source GitHub REST API
Notifications Slack Webhook
Containerization Docker + Compose

📁 Project Structure

/github-weekly-ai-bot
├── src/
│   ├── index.js
│   ├── github/
│   │   ├── client.js
│   │   └── parser.js
│   ├── ai/
│   │   └── summarizer.js
│   ├── slack/
│   │   └── notifier.js
│   ├── config/
│   │   └── env.js
│   └── utils/
│       └── logger.js
├── Dockerfile
├── docker-compose.yml
├── .env.example
└── README.md

⚡ AI-Driven Development Workflow

You’re encouraged to use Gemini CLI or ChatGPT during development to:

  • Scaffold modules (github/client.js, ai/summarizer.js, etc.)
  • Generate prompt templates
  • Create fake PR payloads for testing
  • Fix errors and refactor quickly
  • Write inline comments and docs
  • Prepare your demo pitch

💡 Treat the AI like your third teammate. It writes boilerplate, finds bugs, and explains things while you focus on testing and wiring it all together.


🧾 Stretch Goals

  • Add cron job for weekly automation
  • Different tones (“client-friendly”, “technical”, “fun”)
  • Charts for commit/PR stats (QuickChart API)
  • Simple web dashboard or Slack slash command

🎤 Demo Script

Command:

node src/index.js --repo https://github.com/acme/app --period 7

Flow:

  1. Fetch PRs from the last 7 days from GitHub
  2. Summarize using Gemini
  3. Post result to Slack

Output Example:

Weekly Summary 🎉 — 3 PRs merged, 1 open. Key updates include the new caching layer which improves API speed by 30%, and a fix for the authentication flow. Two edge cases are pending for the next sprint.


👥 Team

Henrique Tegel & Marina Melo Pairing for Hackday 2025 — AI Theme

About

AI-powered GitHub + Slack summarizer for project updates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •