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
- User contributions per day (this is available in the calendar but not in API)
- 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/contributorsendpoint 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/commitsendpoint and iterate all commits and check other branches.
Get branches
/projects/:id/repository/branchesGet 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 by 🤖 GitLab Bot 🤖