From ca43c24c283ca3d58041bac7121b003e8b3ff289 Mon Sep 17 00:00:00 2001 From: Siddharth Asthana Date: Thu, 2 Oct 2025 19:43:07 +0530 Subject: [PATCH 1/3] Add committer avatar and profile link to last commit info This enhancement displays the committer's avatar and links to their GitLab profile in the last commit info box when the committer differs from the author. Previously, only the committer's name was shown as plain text. The implementation adds three new fields to the CommitType GraphQL API: committerAvatarUrl, committerWebUrl, and a committer User object. The backend resolvers check if the committer is a GitLab user and return their profile info, falling back to Gravatar URLs for non-GitLab users. The frontend now displays a clickable avatar using the UserAvatarLink component and makes the committer name a link to their profile when available. For non-GitLab users, the avatar displays as a Gravatar image without a link. 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. Changelog: added Signed-off-by: Siddharth Asthana --- .../repository/components/commit_info.vue | 30 +++- .../repository/path_last_commit.query.graphql | 9 ++ app/graphql/types/repositories/commit_type.rb | 27 ++++ doc/api/graphql/reference/_index.md | 3 + .../repository/components/commit_info_spec.js | 129 ++++++++++++++++++ .../types/repositories/commit_type_spec.rb | 3 +- 6 files changed, 197 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 {