1
0
mirror of https://github.com/actions/labeler synced 2026-05-09 14:51:02 +02:00
This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -137,13 +137,21 @@ class AutocompleteMultiselectPrompt extends MultiselectPrompt {
}
renderInstructions() {
return `
if (this.instructions === undefined || this.instructions) {
if (typeof this.instructions === 'string') {
return this.instructions;
}
return `
Instructions:
${figures.arrowUp}/${figures.arrowDown}: Highlight option
${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
[a,b,c]/delete: Filter choices
enter/return: Complete answer
`;
`;
}
return '';
}
renderCurrentInput() {
@@ -159,8 +167,7 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter so
renderDoneOrInstructions() {
if (this.done) {
const selected = this.value.filter(e => e.selected).map(v => v.title).join(', ');
return selected;
return this.value.filter(e => e.selected).map(v => v.title).join(', ');
}
const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];