blob: 55f046b81b8d847e0127a2ebdf2ed81d2de542ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { ProtectedRefDropdown } from '../protected_refs';
export default class ProtectedBranchDropdown extends ProtectedRefDropdown {
/**
* @param {Object} options matching ProtectedRefDropdown's constructor.
*/
constructor(options) {
const $dropdownContainer = options.$dropdown.parent();
super(options, {
$dropdownFooter: $dropdownContainer.find('.dropdown-footer'),
$createNewProtectedRef: $dropdownContainer.find('.js-create-new-protected-branch'),
protectedRefFieldName: 'protected_branch[name]',
dropdownLabel: 'Protected Branch',
protectedRefsList: gon.open_branches,
});
}
}
|