debian-mirror-gitlab/app/assets/javascripts/jobs/components/commit_block.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1,008 B
Vue
Raw Normal View History

2018-11-20 20:47:30 +05:30
<script>
2019-02-15 15:39:39 +05:30
import { GlLink } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
2018-11-20 20:47:30 +05:30
2018-12-13 13:39:08 +05:30
export default {
components: {
ClipboardButton,
GlLink,
},
props: {
commit: {
type: Object,
required: true,
2018-11-20 20:47:30 +05:30
},
2018-12-13 13:39:08 +05:30
mergeRequest: {
type: Object,
required: false,
default: null,
2018-11-20 20:47:30 +05:30
},
2018-12-13 13:39:08 +05:30
},
};
2018-11-20 20:47:30 +05:30
</script>
<template>
2021-04-17 20:07:23 +05:30
<div>
2021-04-29 21:17:54 +05:30
<span class="gl-font-weight-bold">{{ __('Commit') }}</span>
2018-11-20 20:47:30 +05:30
2021-04-29 21:17:54 +05:30
<gl-link :href="commit.commit_path" class="gl-text-blue-600!" data-testid="commit-sha">
2021-01-03 14:25:43 +05:30
{{ commit.short_id }}
</gl-link>
2018-11-20 20:47:30 +05:30
2021-01-03 14:25:43 +05:30
<clipboard-button
:text="commit.id"
:title="__('Copy commit SHA')"
category="tertiary"
size="small"
/>
2018-11-20 20:47:30 +05:30
2021-01-03 14:25:43 +05:30
<span v-if="mergeRequest">
2021-04-29 21:17:54 +05:30
{{ __('in') }}
<gl-link :href="mergeRequest.path" class="gl-text-blue-600!" data-testid="link-commit"
2021-01-03 14:25:43 +05:30
>!{{ mergeRequest.iid }}</gl-link
>
</span>
2018-11-20 20:47:30 +05:30
2020-06-23 00:09:42 +05:30
<p class="gl-mb-0">{{ commit.title }}</p>
2018-11-20 20:47:30 +05:30
</div>
</template>