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 \
  --group 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 --group 60207604 --start 2026-W05 --end 2026-W06

CLI option:

gitlab-activity-report --access-token "glpat-..." --group 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.1.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.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitlab_activity_report-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d9a393c7f11fd6d44aaae6793d8567e9e1926bdc1cfd6078b5c9cbf147ab4344
MD5 35a13c0dbdfe82324781cff5c14fba27
BLAKE2b-256 f3280465908ad7729ebb9ab48433228c3ddc0a9abdc2249dcca7cb19c8bc039c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gitlab_activity_report-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c0cdcd8172d2c6b3d0a6b724bfc700a120eb5e40a3eed665df5f9e4622bb824
MD5 65bf5e55acef07b694e2da9158635292
BLAKE2b-256 0ca8f70355dab07ff656840707f341f098620c5e18728fdd751345ad997292cf

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