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.2.tar.gz (25.9 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.2-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitlab_pr_analyzer-0.9.2.tar.gz
  • Upload date:
  • Size: 25.9 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.2.tar.gz
Algorithm Hash digest
SHA256 4e100a4146b5afb749fe2fa4d916aeaaf123640655ee32bfe6cb8f923d321ea7
MD5 87f35cf397de8944c8b959ab4b260df3
BLAKE2b-256 6dabfcff608e340420745c09b4dbccec9fa2b690d498bd44ff19c6945aad15d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gitlab_pr_analyzer-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2852756b5fee771f1795f491f9867127f0c43449e003fede3dd6279e23994870
MD5 e2683f0de650f3ce6a2c0c129231f64a
BLAKE2b-256 f930fd6a7f2919fb968a12b18d67f0a0531291879e4c03fb90b6015bf3b6f409

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