Skip to main content
Uneed POTD2 Badge

Git Recap

🎉 Featured in Uneed's Latest Newsletter as a Staff Pick! 🎉

Git Recap is a modular Python tool that aggregates and formats user-authored messages from repositories hosted on GitHub, Azure DevOps, and GitLab. It fetches commit messages, pull requests (along with their associated commits), and issues, then consolidates and sorts these events into a clear, chronological summary. This summary is output as a plain text string that can serve as context for large language models or other analysis tools.

Features

  • Multi-Platform Support:
    Retrieve messages from:

  • Flexible Date Filtering:
    Specify start and end dates (automatically converted to UTC if no timezone info is provided) to restrict the range of events.

  • Author Filtering:
    Optionally specify one or more authors. By default, the authenticated user is used.

  • Output Schema:
    Each fetched event is stored in a standardized dictionary format with keys such as:

    • type (commit, commit_from_pr, pull_request, issue)
    • repo
    • message
    • timestamp
    • Additional keys like sha, pr_title, and pr_number for context
  • Chronological Aggregation:
    All events are merged and sorted in chronological order.
    A helper function then parses the JSON output into a plain text summary grouped by day, making it ideal as context for LLMs.

File Structure

git_recap/
├── README.md
├── requirements.txt
└── src
    ├── __init__.py
    ├── fetcher.py
    └── providers
         ├── __init__.py
         ├── base_fetcher.py
         ├── github_fetcher.py
         ├── azure_fetcher.py
         └── gitlab_fetcher.py
  • fetcher.py:
    Contains the main entry point which parses command-line arguments (provider, PAT, dates, repo filters, etc.) and invokes the appropriate provider fetcher.

  • providers/base_fetcher.py:
    Defines the abstract base class with common functionality such as date filtering and aggregating messages.

  • providers/github_fetcher.py:
    Implements GitHub-specific logic for fetching commits, pull requests (including their commits), and issues.

  • providers/azure_fetcher.py & providers/gitlab_fetcher.py:
    Implement similar logic for Azure DevOps and GitLab respectively.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/git_recap.git
    cd git_recap
    
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Usage

Run the main script with the required parameters. For example:

GitHub

python src/fetcher.py --provider github --pat YOUR_GITHUB_PAT --start-date 2025-03-07T00:00:00 --end-date 2025-03-15T23:59:59 --repos Repo1 Repo2

Azure DevOps

python src/fetcher.py --provider azure --pat YOUR_AZURE_PAT --organization-url https://dev.azure.com/YOURORG --start-date 2025-03-07T00:00:00 --end-date 2025-03-15T23:59:59 --repos Repo1 Repo2

GitLab

python src/fetcher.py --provider gitlab --pat YOUR_GITLAB_PAT --gitlab-url https://gitlab.example.com --start-date 2025-03-07T00:00:00 --end-date 2025-03-15T23:59:59 --repos Repo1 Repo2

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

License

This project is licensed under the terms of the MIT License.

Acknowledgements

Release files for git-recap 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-recap 0.1.6
File Size Uploaded
git_recap-0.1.6.tar.gz 34.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-recap 0.1.6
File Interpreter ABI Platform
git_recap-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 67.6 kB

Release files / git_recap-0.1.6.tar.gz

Download URL git_recap-0.1.6.tar.gz
Size 34.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9245fd5384added178af6fc235c37df6c75aa0f507c1274f7bdbc862a25619
BLAKE2b-256 checksum
How to use checksums
e4491ea798d609886c3e7ab2018b0266f0460812765e0fed171035111efcc9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / git_recap-0.1.6-py3-none-any.whl

Download URL git_recap-0.1.6-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90678588d2edc20c10436e56f28dd06ae7f190391917dfa0dc42a50139f2befd
BLAKE2b-256 checksum
How to use checksums
c4765c44601ea41bb6a271294abb2342dfc14c16e889007e42bc901521bc5c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page