Skip to content

Commit 4e3c9c0

Browse files
committed
feat: prepopulate repository url
1 parent 3e0000e commit 4e3c9c0

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/prompt.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ export const gatherDetails = (initialOptions: Options): Promise<OptionValues> =>
5252
},
5353
{
5454
type: 'text',
55-
name: 'repo',
56-
message: `What is the repository URL for your plugin?\n`,
57-
validate: VALIDATORS.repo,
55+
name: 'author',
56+
message: `${kleur.reset('(optional)')} ${kleur.bold('Who is the author of this plugin?')}\n`,
57+
validate: VALIDATORS.author,
5858
format: (value) => value.trim(),
5959
},
6060
{
6161
type: 'text',
62-
name: 'author',
63-
message: `${kleur.reset('(optional)')} ${kleur.bold('Who is the author of this plugin?')}\n`,
64-
validate: VALIDATORS.author,
62+
name: 'repo',
63+
message: `What is the repository URL for your plugin?\n`,
64+
initial: (_prev, values) => `https://github.com/${values.author}/${values.dir}`,
65+
validate: VALIDATORS.repo,
6566
format: (value) => value.trim(),
6667
},
6768
{

0 commit comments

Comments
 (0)