Skip to main content

Intelligent tool for collecting, analyzing, and summarizing GitLab Merge Requests and commits

Project description

GitLab MR & Commit Analyzer

中文文档 | English

A command-line tool for intelligently collecting, analyzing, and summarizing GitLab Merge Requests and commit records.

Installation & Setup

Prerequisites

  • Python 3.8+
  • Git
  • GitLab access
    • GITLAB_HOST (e.g. https://gitlab.example.com)
    • GITLAB_TOKEN (PAT with read_api or api scope)

Recommended (optional)

  • GitLab CLI (glab): recommended for better and faster diff retrieval
    • install and authenticate: glab auth login

Install GitLab CLI (glab)

  • macOS (Homebrew):
brew install glab
glab auth login
  • Linux (APT, Ubuntu/Debian):
sudo apt update
sudo apt install -y glab
glab auth login
  • Windows (Winget):
winget install --id GitLab.glab
glab auth login

Daily usage tip: use the short command glpa (legacy: gl-pr-analyzer, gl-pr-ai).

Install

pip install gitlab-pr-analyzer

Configuration (Environment Variables)

Variable Description Required
GITLAB_HOST GitLab instance base URL Yes
GITLAB_TOKEN Personal Access Token Yes
GITLAB_INSTANCE_NAME Banner display name No
CURSOR_AGENT_PATH Path to cursor-agent for AI features No (Yes for AI)

Quick Start

# 0. Check connectivity (recommended after setting env vars)
glpa check

# 1. Interactive Mode (best for starting)
glpa interactive

# 2. Search with AI analysis (English output)
glpa search "authentication bug" --ai

# 3. Search with AI analysis (Chinese output)
glpa search "authentication bug" --ai -cn

# 4. Collect data
glpa collect --save-json

# 5. Generate report + export datasets
glpa traverse --days 7 --save-json

# optional: enable AI analysis for traverse
glpa traverse --days 7 --save-json --ai -cn

For detailed command usage, see USAGE.md.

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

gitlab_pr_analyzer-0.9.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

gitlab_pr_analyzer-0.9.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_pr_analyzer-0.9.1.tar.gz.

File metadata

  • Download URL: gitlab_pr_analyzer-0.9.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gitlab_pr_analyzer-0.9.1.tar.gz
Algorithm Hash digest
SHA256 bc19504e930eca0992fbfdb266e5902d5769db6efd574fca566269c664619162
MD5 a2e8c55f84167cb011b88cff8ce76b83
BLAKE2b-256 1c14624cec2c53f1ff921520da9de8609c90f9f6866475c710a37e2e71e1287f

See more details on using hashes here.

File details

Details for the file gitlab_pr_analyzer-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_pr_analyzer-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f1b15881cb598eeb6423b8b2000f39d6ca27d71729043744c4a7a9b4d7c97a4
MD5 e82108070c734267327bf1e97fd8292a
BLAKE2b-256 c3253aa212aeff3d2fb5a0b45b4c5331d794176d739b0d1f1e4577ffa75f803b

See more details on using hashes here.

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