Skip to content

Github action to summarize the Github commits in the last X days

License

Notifications You must be signed in to change notification settings

gentrace/git-summarizer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Weekly Summary Action

A GitHub Action that generates weekly summaries of code changes using OpenAI and sends them to Slack.

Features

  • Analyzes git commits over a specified time period
  • Uses OpenAI's models to generate human-readable summaries
  • Posts summaries directly to a Slack channel
  • Configurable analysis period and model selection

Usage

Add this action to your GitHub workflow:

name: Weekly Code Summary
on:
  schedule:
    - cron: "0 10 * * 1" # Runs at 10:00 AM every Monday
  workflow_dispatch: # Allows manual triggering

jobs:
  summarize:
    runs-on: ubuntu-latest
    steps:
      - uses: gentrace/git-summarizer@v1
        with:
          openai_api_key: ${{ secrets.OPENAI_API_KEY }}
          slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
          slack_channel: "C088V1U72BC" # Required - Slack channel ID
          days_to_analyze: "7" # Optional, defaults to 7
          model: "o1" # Optional, defaults to o1

Inputs

Input Description Required Default
openai_api_key OpenAI API key for generating summaries Yes -
slack_bot_token Slack Bot Token for sending messages Yes -
slack_channel Slack channel ID (e.g., C088V1U72BC) Yes -
days_to_analyze Number of days of history to analyze No 7
model OpenAI model to use for summarization No o1

Setup

  1. Create an OpenAI API key at https://platform.openai.com
  2. Create a Slack Bot Token at https://api.slack.com/apps
  3. Add both tokens as secrets in your GitHub repository
  4. Get your Slack channel ID (right-click channel → Copy channel ID)
  5. Add the workflow file to your repository at .github/workflows/weekly-summary.yml
  6. Make sure your Slack bot has been invited to the target channel

License

MIT

About

Github action to summarize the Github commits in the last X days

Resources

License

Stars

Watchers

Forks

Packages

No packages published