Skip to main content

Collect GitLab group activity and render static JSON/HTML reports

Project description

gitlab-activity-report

Collects GitLab activity for a parent group (and descendants), outputs a JSON report with both by_user and by_project, and writes a fully static HTML viewer.

Install

pip install .

This installs the console executable:

gitlab-activity-report --help

You can also run from source checkout:

./gitlab-activity-report --help

Usage

gitlab-activity-report \
  60207604 \
  --start 2026-W05 \
  --end 2026-W06 \
  --output-json report.json \
  --output-html report.html

Authentication

A GitLab access token is required. Provide it either by environment variable or CLI option.

Environment variable:

export GITLAB_ACCESS_TOKEN="glpat-..."
gitlab-activity-report 60207604 --start 2026-W05 --end 2026-W06

CLI option:

gitlab-activity-report --access-token "glpat-..." 60207604 --start 2026-W05 --end 2026-W06

Token requirements:

  • Role: Reporter
  • Scope: read_api

User Mapping File

gitlab-activity-report expects a user mapping file at username_author.json by default (or provide a path with --usermap).

Start from the included example file:

cp username_author.json.example username_author.json

This mapping is used to map git commit author name/email values to GitLab usernames.

Output shape

report.json contains:

  • meta: report metadata (generated_at, group_id, date range)
  • by_user: activity grouped by user, then project
  • by_project: project-centric activity keyed by namespace path/id

Each project entry includes group context:

  • group.full_path
  • group.path_from_start (subgroup tree path relative to selected start group)
  • path_with_namespace relative to the selected base group path

Each activity includes:

  • actor
  • activity_heading ({actor}: {activity_type} - {body or title})
  • activity_type
  • title
  • timestamps (created_at, updated_at)
  • optional detail payloads from GitLab APIs

report.html is standalone and static (no external scripts/styles/requests).

License

MIT. See LICENSE.

Releasing

Release process and CI publishing details are documented in RELEASING.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_activity_report-0.1.2.tar.gz (18.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_activity_report-0.1.2-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_activity_report-0.1.2.tar.gz.

File metadata

  • Download URL: gitlab_activity_report-0.1.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for gitlab_activity_report-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ecc2627d59c825dc3f9001d2afb10cb0494960f0a6cfa7cabe4177dfac0a56fe
MD5 a38fc88430f18eaf8ca47c429f3d9108
BLAKE2b-256 0a7dc4de42be17dd2a18a2750fd1f212f776777b2442e1b7feb59e7f1894d669

See more details on using hashes here.

File details

Details for the file gitlab_activity_report-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_activity_report-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58711c6f735808c3cc09edb54d6b7d44596d4ff7a5fb3b482f0c0c33fcf135e8
MD5 644f0549e7a33314940f9006b0bb7152
BLAKE2b-256 2eb203712c4604f3af940ddc7e67a453e0b71dcdd96149f9051a8cacefdc2a50

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