Skip to content

Commit 5b23dd8

Browse files
committed
fix(hosts-prompt): list host names as choices rather than full plugins
1 parent 7ad591a commit 5b23dd8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/vcs/host/prompt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default async function (hosts, visibility, decisions) {
77
name: questionNames.REPO_HOST,
88
type: 'list',
99
message: 'Where will the repository be hosted?',
10-
choices: hosts
10+
choices: Object.keys(hosts)
1111
}], decisions);
1212
const host = hosts[answers[questionNames.REPO_HOST]];
1313

src/vcs/host/prompt.test.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,22 @@ describe('vcs host details prompt', () => {
2727
name: questionNames.REPO_HOST,
2828
type: 'list',
2929
message: 'Where will the repository be hosted?',
30-
choices: hosts
30+
choices: hostNames
3131
}], decisions).mockResolvedValue(answersWithHostChoice);
3232

3333
expect(await promptForVcsHostDetails(hosts, null, decisions)).toEqual(answersWithHostChoice);
3434
});
3535

3636
it('should not throw an error when `Other` is chosen as the host', async () => {
37-
const hosts = {};
3837
const visibility = any.word();
3938
const answersWithHostChoice = {...answers, [questionNames.REPO_HOST]: 'Other'};
4039
when(prompts.prompt).calledWith([{
4140
name: questionNames.REPO_HOST,
4241
type: 'list',
4342
message: 'Where will the repository be hosted?',
44-
choices: hosts
43+
choices: []
4544
}], decisions).mockResolvedValue(answersWithHostChoice);
4645

47-
expect(await promptForVcsHostDetails(hosts, visibility, decisions)).toEqual(answersWithHostChoice);
46+
expect(await promptForVcsHostDetails({}, visibility, decisions)).toEqual(answersWithHostChoice);
4847
});
4948
});

0 commit comments

Comments
 (0)