blob: f5fb72e84bc5157676836578e9cb00690f5217d5 (
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
|
<script>
import RefSelector from '~/ref/components/ref_selector.vue';
import { REF_TYPE_BRANCHES } from '~/ref/constants';
import { __ } from '~/locale';
export default {
components: {
RefSelector,
},
props: {
persistedDefaultBranch: {
type: String,
required: true,
},
projectId: {
type: String,
required: true,
},
},
refTypes: [REF_TYPE_BRANCHES],
i18n: {
dropdownHeader: __('Select default branch'),
searchPlaceholder: __('Search branch'),
},
};
</script>
<template>
<ref-selector
:value="persistedDefaultBranch"
class="gl-w-full"
:project-id="projectId"
:enabled-ref-types="$options.refTypes"
:translations="$options.i18n"
name="project[default_branch]"
data-testid="default-branch-dropdown"
/>
</template>
|