diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/vue_shared/components/commit.vue | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/commit.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/commit.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/components/commit.vue b/app/assets/javascripts/vue_shared/components/commit.vue index deca934e283..d1eee62683b 100644 --- a/app/assets/javascripts/vue_shared/components/commit.vue +++ b/app/assets/javascripts/vue_shared/components/commit.vue @@ -1,6 +1,6 @@ <script> -import { isString, isEmpty } from 'lodash'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui'; +import { isString, isEmpty } from 'lodash'; import { __, sprintf } from '~/locale'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; import UserAvatarLink from './user_avatar/user_avatar_link.vue'; @@ -133,6 +133,9 @@ export default { ? sprintf(__("%{username}'s avatar"), { username: this.author.username }) : null; }, + refUrl() { + return this.commitRef.ref_url || this.commitRef.path; + }, }, }; </script> @@ -156,9 +159,10 @@ export default { <gl-link v-else v-gl-tooltip - :href="commitRef.ref_url" + :href="refUrl" :title="commitRef.name" class="ref-name" + data-testid="ref-name" >{{ commitRef.name }}</gl-link > </template> |