For now I am trying this API (just randomly picked an id from a project)
https://gitlab.com/api/v4/projects/3199253/repository/contributors
And I find that the commit number is always 1 while it is more than 1 on the contributor page. Meanwhile, the list is not completed and a lot of people are not on the returned result.
I checked the documentation and it doesn't seem like I need to paging it or I have the option to do so.
https://docs.gitlab.com/ee/api/repositories.html#contributors
Please let me know if there's any better way to count all commits of a user on GitLab. Thanks in advance!
UPDATE: Just found a related issue on Gitlab here:
https://gitlab.com/gitlab-org/gitlab/-/issues/233119
Looks like the commit count will always be 1 due to a bug at the moment?
UPDATE: For now I am scanning the list of commits and matching them with the current user with a for loop (they said it has better performance than map()). Guess that would consume unnecessary API call usage.