Add optional ref parameter to Contributors API endpoint
What does this MR do and why?
Adds an optional ref
parameter to the Repository - Contributors API endpoint to match the functionality that is already possible using the Contributor analytics UI page.
Brought up by customer in Zendesk ticket (internal).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Default | With ref
|
---|---|
How to set up and validate locally
- Import or create a project from an existing repo, such as pages/plain-html
- Create a new branch
- Commit a change to the new branch
- Call the API endpoint without the
ref
optionhttps://gitlab.example.com/api/v4/projects/:id/repository/contributors
- Call the API endpoint with the
ref
optionhttps://gitlab.example.com/api/v4/projects/:id/repository/contributors?ref=:ref
Related to #207479 (closed)
Edited by Jio Castillo