2018-11-20 20:47:30 +05:30
|
|
|
<script>
|
2018-12-13 13:39:08 +05:30
|
|
|
import { GlLink } from '@gitlab-org/gitlab-ui';
|
|
|
|
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
|
|
|
isLastBlock: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-11-20 20:47:30 +05:30
|
|
|
</script>
|
|
|
|
<template>
|
2018-12-05 23:21:45 +05:30
|
|
|
<div
|
|
|
|
:class="{
|
|
|
|
'block-last': isLastBlock,
|
|
|
|
block: !isLastBlock
|
|
|
|
}">
|
2018-11-20 20:47:30 +05:30
|
|
|
<p>
|
|
|
|
{{ __('Commit') }}
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
:href="commit.commit_path"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-commit-sha commit-sha link-commit"
|
2018-12-13 13:39:08 +05:30
|
|
|
>{{ commit.short_id }}</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
<clipboard-button
|
2018-12-05 23:21:45 +05:30
|
|
|
:text="commit.short_id"
|
2018-11-20 20:47:30 +05:30
|
|
|
:title="__('Copy commit SHA to clipboard')"
|
2018-12-05 23:21:45 +05:30
|
|
|
css-class="btn btn-clipboard btn-transparent"
|
2018-11-20 20:47:30 +05:30
|
|
|
/>
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
v-if="mergeRequest"
|
|
|
|
:href="mergeRequest.path"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-link-commit link-commit"
|
2018-12-13 13:39:08 +05:30
|
|
|
>!{{ mergeRequest.iid }}</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
</p>
|
|
|
|
|
|
|
|
<p class="build-light-text append-bottom-0">
|
2018-12-05 23:21:45 +05:30
|
|
|
{{ commit.title }}
|
2018-11-20 20:47:30 +05:30
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</template>
|