Skip to main content

Extract Azure DevOps Pull Request metrics to SQLite and generate PowerBI-compatible CSVs.

Project description

Git Repo Insights

ADO Git Repo Insights

CI Release AI Review Maintained Last Commit

PyPI version Python Python Coverage Python Tests

TypeScript TypeScript Coverage TypeScript Tests

Node.js pnpm Code Style: Prettier Conventional Commits

License Platform PRs Welcome Live Demo

[!NOTE] Python Compatibility: Requires Python 3.12 or later. Uses pandas 3.x.

Extract Azure DevOps Pull Request metrics to SQLite and generate PowerBI-compatible CSVs.


🚀 Quick Start

Choose your path:

I want to... Use
Analyze PRs for my team via Azure DevOps pipelines ADO Extension
Run analysis locally or integrate into custom CI/CD Python CLI

☁️ Azure DevOps Extension

The ADO Extension provides a self-contained pipeline task with a built-in PR Insights Dashboard directly in your Azure DevOps project.

Git Repo Insights Install from Marketplace

What you get:

  • Pipeline task that extracts PR metrics automatically
  • Interactive dashboard in your ADO project navigation
  • No Python installation required
  • PowerBI-compatible CSV exports

Get started: Extension User Guide

Minimal Pipeline Example

variables:
    - group: ado-insights-secrets # Contains PAT_SECRET

steps:
    - task: ExtractPullRequests@3
      inputs:
          organization: "MyOrg"
          projects: "Project1,Project2"
          pat: "$(PAT_SECRET)"

    - publish: $(Pipeline.Workspace)/aggregates
      artifact: aggregates

ExtractPullRequests pipeline task configuration in Azure DevOps


🐍 Python CLI

The Python CLI provides full control for local analysis, custom scripts, and non-ADO CI/CD systems.

# Install (recommended)
pipx install ado-git-repo-insights

# Extract → CSV → dashboard
ado-insights extract --organization MyOrg --projects "Project1,Project2" --pat $ADO_PAT --database ./ado-insights.sqlite
ado-insights generate-csv --database ./ado-insights.sqlite --output ./csv_output
ado-insights build-aggregates --db ./ado-insights.sqlite --out ./dataset
ado-insights dashboard --dataset ./dataset --open

Get started: CLI User Guide — covers uv and pip install paths, configuration files, and CI/CD integration.


📚 Documentation

👤 For End Users

Document Description
Extension User Guide Complete setup for ADO Extension users
CLI User Guide Complete setup for Python CLI users
Troubleshooting Common issues and solutions

📖 Reference

Document Description
CLI Command Reference All CLI commands and options
Task Input Reference Extension task configuration
CSV Schema PowerBI-compatible output format
Dataset Contract Dashboard data format specification
Architecture System design and data flow diagrams

⚙️ Operations

Document Description
Runbook Monitoring, recovery, and operational procedures
Data Retention Storage model and security posture

🛠️ For Developers

Document Description
Contributing Guide How to contribute to this project
Development Setup Setting up the development environment
Testing Guide Running and writing tests
Demo Data Versioning Canonical demo build and parity policy
UI Bundle Sync Dashboard UI synchronization process
Changelog Version history and release notes

📋 Governance

Document Description
Invariants Non-negotiable system invariants
Definition of Done Completion criteria for features
Verification Gates Verification checkpoints

⚖️ Feature Comparison

Feature CLI Extension
Installation pip install ADO Marketplace
Requires Python Yes No (bundled)
Pipeline syntax Script steps Task step
Works outside ADO Yes No
PR Insights Dashboard Local server Built into ADO
Configuration YAML file or CLI args Task inputs
Flexibility Higher Standard

⚡ How It Works

  1. Extract — Fetches completed PRs from Azure DevOps REST API
  2. Store — Persists data in SQLite with UPSERT semantics
  3. Generate — Produces PowerBI-compatible CSVs and dashboard aggregates
  4. Visualize — View metrics in the PR Insights Dashboard

The system uses incremental extraction by default (daily) with optional backfill mode to catch late changes (reviewer votes, status updates).

Comment extraction is opt-in via --include-comments on extract; to cover PR comments for history that predates enabling it, run the one-time backfill-comments subcommand — see the extension guide or CLI guide.

PR Insights Dashboard showing cycle time trends, throughput charts, and reviewer activity


🤖 ML Features (Optional)

The dashboard supports optional ML-powered features: time-series forecasting for cycle time and throughput (zero-config, no API key) and AI insights for bottleneck analysis (requires an OpenAI API key, ~$0.001–0.01 per pipeline run, only aggregated metrics sent — never PR content, identities, or code).

Setup and troubleshooting: Enable ML Features


🛠️ Developer Setup


🔒 Security

PATs use minimum Code (Read) scope, are never logged, and are never persisted at rest. Full posture: docs/SECURITY.md.


💬 Support


📄 License

MIT

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

ado_git_repo_insights-101.28.2.tar.gz (9.0 MB view details)

Uploaded Source

Built Distribution

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

ado_git_repo_insights-101.28.2-py3-none-any.whl (358.5 kB view details)

Uploaded Python 3

File details

Details for the file ado_git_repo_insights-101.28.2.tar.gz.

File metadata

  • Download URL: ado_git_repo_insights-101.28.2.tar.gz
  • Upload date:
  • Size: 9.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ado_git_repo_insights-101.28.2.tar.gz
Algorithm Hash digest
SHA256 a142f0fecf2f3d7d1c27c090923e473b175ef150d10540756d55aa90e3bb7168
MD5 541b2213a60aa1ca268db020561f1da6
BLAKE2b-256 4cc0d1cb74d4779a07071b78f3a35f02aadd5b34e4da09aa476d425abb4bf58a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ado_git_repo_insights-101.28.2.tar.gz:

Publisher: release.yml on oddessentials/ado-git-repo-insights

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

File details

Details for the file ado_git_repo_insights-101.28.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ado_git_repo_insights-101.28.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab67866e437df59baf40fcf9011723c0e7facbc3835d2d3189def98bb6770cc
MD5 fea511c39db2052e012a81684997d1a7
BLAKE2b-256 4b30d4d777ea6b5a348ac2c926b84525cdce00f2fabfe098f1cf801647673404

See more details on using hashes here.

Provenance

The following attestation bundles were made for ado_git_repo_insights-101.28.2-py3-none-any.whl:

Publisher: release.yml on oddessentials/ado-git-repo-insights

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