Fix GitLab user productivity stats not fetching commits, merge requests, and issues correctly
The get_user_productivity(username) function is not returning correct productivity statistics for GitLab users. Even when the user has commits, merge requests, and issues in the GitLab project, the function returns zero values for these fields.
This issue occurs because the current implementation does not properly identify the GitLab user when fetching activity data. GitLab commits cannot be reliably matched using only the username, since commit records use author email and committer email instead of the GitLab username. As a result, commits are not counted correctly.
Similarly, merge requests and issues must be fetched using the GitLab user_id with proper API filters such as author_id. Without using the correct user identification, the productivity data becomes inaccurate.
This issue affects productivity tracking, reporting, and leaderboard features, as they rely on accurate commit, merge request, and issue counts.
The function needs to correctly resolve the GitLab user using the GitLab API and use user_id and email to fetch and count commits, merge requests, and issues accurately.