Skip to main content

Automatically discover and summarise your weekly GitHub impact

Project description

gh-weekly-updates

Automatically discover and summarise your weekly GitHub impact using AI.

gh-weekly-updates collects your GitHub activity — pull requests authored & reviewed, issues created & commented on, discussions — and generates a structured Markdown summary using GitHub Models.

Features

  • Auto-discover repos via the GitHub GraphQL Contributions API, or provide an explicit list
  • Collect detailed activity: PRs, reviews, issues, issue comments, discussions
  • AI-powered summarisation via GitHub Models (openai/gpt-4.1 by default)
  • Structured output: Wins / Strategic Influence / Challenges with inline links
  • Push to a repo: automatically commit summaries to a GitHub repo for sharing
  • Fully configurable: org, repos, model, prompt — via YAML config or CLI flags
  • Custom prompts: tailor the AI summary to your team's format

Installation

pip install gh-weekly-updates

Requirements

  • Python 3.11+
  • A GitHub personal access token (PAT) or the GitHub CLI (gh) authenticated
    • Required scopes: repo, read:org
    • The token also needs access to GitHub Models for AI summarisation

Quick start

# Authenticate with the GitHub CLI (easiest)
gh auth login

# Run with defaults — covers the past week
gh-weekly-updates

# Or specify a date range
gh-weekly-updates --since 2025-06-01 --until 2025-06-07

Configuration

Create a config.yaml (see config.example.yaml):

# GitHub org to scope repo discovery to
org: my-org

# Explicit repo list (skips auto-discovery)
repos:
  - my-org/api-service
  - my-org/web-app

# GitHub Model for summarisation
model: openai/gpt-4.1

# Push summary to a repo under weekly-updates/
push_repo: my-user/my-updates

# Custom system prompt (inline)
prompt: |
  You are an engineering manager writing a concise weekly summary...

# Or load prompt from a file
# prompt_file: my-prompt.txt

CLI reference

Usage: gh-weekly-updates [OPTIONS]

Options:
  --config PATH    Path to YAML config file. Default: ./config.yaml
  --since TEXT      Start date (ISO 8601). Default: previous Monday.
  --until TEXT      End date (ISO 8601). Default: now.
  --user TEXT       GitHub username. Default: authenticated user.
  --repos TEXT      Comma-separated list of repos (owner/name).
  --org TEXT        GitHub org to scope repo discovery to.
  --output PATH    Write summary to a file instead of stdout.
  --push TEXT       Push summary to a GitHub repo (owner/name).
  --model TEXT      GitHub Model to use. Default: openai/gpt-4.1.
  --verbose         Enable debug logging.
  --help            Show this message and exit.

Authentication

gh-weekly-updates resolves a GitHub token in this order:

  1. GITHUB_TOKEN environment variable
  2. gh auth token (GitHub CLI)

For GitHub Enterprise with SSO, ensure the token is authorised for your org.

Using with GitHub Actions

You can run gh-weekly-updates on a schedule in a GitHub Actions workflow:

name: Weekly Impact Summary

on:
  schedule:
    - cron: '0 9 * * 1'  # Every Monday at 9am UTC
  workflow_dispatch:

jobs:
  summarise:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install gh-weekly-updates
        run: pip install gh-weekly-updates

      - name: Generate summary
        env:
          GITHUB_TOKEN: ${{ secrets.GH_PAT }}
        run: |
          gh-weekly-updates \
            --config config.yaml \
            --push my-user/my-updates

Note: The default GITHUB_TOKEN provided by Actions has limited scope. Use a Personal Access Token stored as a repository secret with repo and read:org scopes, plus GitHub Models access.

Development

git clone https://github.com/sahansera/gh-weekly-updates.git
cd gh-weekly-updates
python -m venv .venv && source .venv/bin/activate
make dev   # install in editable mode with dev deps
make run   # run with defaults
make lint  # ruff check

See CONTRIBUTING.md for more details.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_weekly_updates-0.1.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_weekly_updates-0.1.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file gh_weekly_updates-0.1.0.tar.gz.

File metadata

  • Download URL: gh_weekly_updates-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gh_weekly_updates-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0d664c87ae9b43958c0eed49e38f74551888734dc17df77a246fbdeed4b5949
MD5 a38ba5cf4f27a30f97fbfe7bfa1aca9d
BLAKE2b-256 1457bbe829a67770a74507d62cf05f8fe1acd76b2605ec58bdff252abb3983eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_weekly_updates-0.1.0.tar.gz:

Publisher: publish.yml on sahansera/gh-weekly-updates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gh_weekly_updates-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_weekly_updates-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0219ee3dfb5e0dd5e81b24d78073652711dd9477cc01015c45f9589e9de775ba
MD5 ace97a10b81ee2509a5d8ec4e84299e3
BLAKE2b-256 66a6e3b0a3036553ee2ed047e33ec5783754abd40b4ecd8ecd1e3cbcfa59d355

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_weekly_updates-0.1.0-py3-none-any.whl:

Publisher: publish.yml on sahansera/gh-weekly-updates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page