Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 3.72 KB

File metadata and controls

66 lines (54 loc) · 3.72 KB

Walkthrough: GitHub Multi-Repository Analytics Tool (github_tracker.py)

A dedicated solution has been built for monitoring software development metrics across multiple GitHub projects.

What Was Created

1. github_tracker.py

A complete command-line analytics and monitoring dashboard for GitHub repositories:

  • Metrics Collected per Repository:
    • Commits: Latest commit message, author, date, and recent commit velocity.
    • Pull Requests: Real-time open PR count (separated from issues).
    • Issues: True open issues count (excluding PRs).
    • Releases: Latest release tag version and publication date.
    • Project Health: Stars, forks, primary language, license, and default branch.
  • Visual Terminal UI (Rich):
    • KPI summary cards (Monitored Projects, Total Stars, Open PRs, Open Issues, Tagged Releases).
    • Comparison table with metric sorting (--sort stars, --sort prs, --sort issues, --sort forks, --sort name).
    • Single project deep dive mode (--detail owner/repo) providing detailed sub-tables for commits, PRs, issues, releases, and language percentage breakdown.
  • Smart Local Caching:
    • Automatically caches responses in .github_tracker_cache.json.
    • Subsequent runs load instantly in milliseconds without consuming GitHub API quota.
    • Supports --refresh to force live re-fetching.
  • API Rate Limit Guard:
    • Displays remaining API quota after each query.
    • Supports GitHub Personal Access Tokens via GITHUB_TOKEN environment variable or --token flag.
  • Exporting:
    • Exports reports to Markdown (.md), CSV (.csv), or JSON (.json) via --export.

2. repos.txt

Configuration file for tracking repositories by default (e.g. pallets/flask, tiangolo/fastapi, psf/requests, encode/httpx).

3. Updated requirements.txt & Readme.md

Documented the new CLI tool with quickstart examples.


Verification Results

Multi-Project Dashboard Overview

Monitoring 2 GitHub Projects (Source: CLI args)

+--- Monitored ---+ +- Popularity -+ +- Active PRs -+ +-- Issues ---+
| 2               | | 174,364      | | 2            | | 94          |
| Projects        | | Total Stars  | | Open PRs     | | Open Issues |
+-----------------+ +--------------+ +--------------+ +-------------+
+--- Releases ----+                                                  
| 2               |                                                  
| Tagged Releases |                                                  
+-----------------+                                                  

            GitHub Repository Analytics Dashboard (Sorted by Stars)            
+------------------+-------+--------+-------+--------+-------+--------+-------+
| Repository       | Lang  |  Stars | Forks |   Open |  Open | Latest | Latest|
|                  |       |        |       |    PRs | Issues| Commit | Release
+------------------+-------+--------+-------+--------+-------+--------+-------+
| tiangolo/fastapi | Python| 102,159| 9,865 |      1 |    91 | 2026-09| 0.141 |
| pallets/flask    | Python| 72,205 | 16,979|      1 |     3 | 2026-08| 3.1.3 |
+------------------+-------+--------+-------+--------+-------+--------+-------+

Single-Project Deep Dive (--detail pallets/flask)

  • Tested and rendered project header, language distribution (Python: 99.9%), recent commits table, recent PRs table, recent open issues, and recent releases.

Report Export

  • Tested --export test_report.md generating a markdown table report.