From f4a7943a5eeec86ede377953692515a92c6bc642 Mon Sep 17 00:00:00 2001 From: Siddharth Asthana Date: Wed, 8 Oct 2025 01:37:34 +0530 Subject: [PATCH] Display committer avatar and profile link in last commit info This enhances the last commit info box to display the committer's avatar and link to their GitLab profile when the committer differs from the author. Previously, only the committer's name was shown as plain text. The frontend now displays a clickable committer avatar using the UserAvatarLink component and makes the committer name a clickable link to their profile when available. For non-GitLab users, the avatar displays as a Gravatar image without a link, and the name shows as plain text. This provides better UX and consistency with how author information is displayed, making it easier to identify and navigate to contributor profiles directly from the repository file browser. The implementation consumes the new GraphQL fields added in the backend MR (committerAvatarUrl, committerWebUrl, and committer User object) and handles all scenarios: GitLab users, non-GitLab users, and when no committer information is available. Depends on: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/207932 Changelog: added Signed-off-by: Siddharth Asthana --- .../repository/components/commit_info.vue | 30 +++- .../repository/path_last_commit.query.graphql | 9 ++ .../repository/components/commit_info_spec.js | 129 ++++++++++++++++++ .../repository/components/last_commit_spec.js | 2 +- spec/frontend/repository/mock_data.js | 9 ++ 5 files changed, 175 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/repository/components/commit_info.vue b/app/assets/javascripts/repository/components/commit_info.vue index f9fb971b2968fc..64578570224ab9 100644 --- a/app/assets/javascripts/repository/components/commit_info.vue +++ b/app/assets/javascripts/repository/components/commit_info.vue @@ -146,13 +146,37 @@ export default {