blob: 5baeb309f7997385507297569e61499df48a7153 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
export default {
components: {
GlDropdown,
GlDropdownItem,
},
props: {
commits: {
type: Array,
required: true,
default: () => [],
},
},
};
</script>
<template>
<div>
<gl-dropdown
right
text="Use an existing commit message"
category="tertiary"
variant="confirm"
size="small"
class="mr-commit-dropdown"
>
<gl-dropdown-item
v-for="(commit, index) in commits"
:key="index"
class="text-nowrap text-truncate"
@click="$emit('input', commit.message)"
>
<span class="monospace mr-2">{{ commit.shortId || commit.short_id }}</span>
{{ commit.title }}
</gl-dropdown-item>
</gl-dropdown>
</div>
</template>
|