User Activity API

ZD: https://gitlab.zendesk.com/agent/tickets/32598

Description

Get total user activity for a project "how much commits/projects/per day (or within a date range)" without double counting.

Proposal

  1. User contributions per day (this is available in the calendar but not in API)
  1. Commits per projects per date (the total is available in the database as “SELECT sum(commit_count) FROM projects” but not date wise) without double counting commits across the branches.

Workaround

The /projects/:id/repository/contributors endpoint only counts commits made to the master branch. The problem is that any feature branch will also contain commits from master.

You may need to use the /projects/:id/repository/commits endpoint and iterate all commits and check other branches.

Get branches /projects/:id/repository/branches Get commits on branch /projects/:id/repository/commits?ref_name=branch-name

You'd need to exclude commits from the "master" branch when checking other branches.

Edited Sep 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading