Skip to content

Commit 5569db5

Browse files
committed
[#22] Make branch deployment selection searchable.
1 parent 91fc2b0 commit 5569db5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/interactive.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,12 @@ async function deployBranchFlow(instance, project, projectDetails) {
495495
}));
496496

497497
// Allow user to select a branch
498-
const selectedBranch = await select({
498+
const selectedBranch = await search({
499499
message: 'Select a branch to deploy:',
500-
choices: choices,
500+
source: (input) => {
501+
input = input || '';
502+
return choices.filter(choice => choice.name.toLowerCase().includes(input.toLowerCase()));
503+
},
501504
// Modern select doesn't have autocomplete but we can set reasonable pagination
502505
loop: true,
503506
pageSize: 10

0 commit comments

Comments
 (0)