From c8342af41d1219c29ae551217bf9f0f5d8d51e59 Mon Sep 17 00:00:00 2001 From: Tommy Petty Date: Thu, 21 Mar 2024 17:05:34 -0400 Subject: [PATCH 1/3] fix(cli): add note about webhooks in migration run command --- .../cli/commands/migration/runMigrationCommand.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts index 20524462e29..7b7b2748c92 100644 --- a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts +++ b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts @@ -179,6 +179,14 @@ const runMigrationCommand: CliCommandDefinition = { return } + output.print( + `\n${chalk.yellow( + chalk.bold( + 'Note: If configued, migrations will trigger webhooks. You can disable webhooks on https://manage.sanity.io', + ), + )}\n`, + ) + const response = flags.confirm && (await prompt.single({ From bd0ed9d8dff1736d87cafcc9b80be3f524c90fa0 Mon Sep 17 00:00:00 2001 From: Tommy Petty Date: Fri, 22 Mar 2024 15:40:02 -0400 Subject: [PATCH 2/3] fix(cli): add note about webhooks in migration run command --- .../cli/commands/migration/runMigrationCommand.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts index 7b7b2748c92..5717f79c14f 100644 --- a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts +++ b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts @@ -181,11 +181,13 @@ const runMigrationCommand: CliCommandDefinition = { output.print( `\n${chalk.yellow( - chalk.bold( - 'Note: If configued, migrations will trigger webhooks. You can disable webhooks on https://manage.sanity.io', - ), - )}\n`, + chalk.bold('Note: If your dataset has active webhooks, migrations will trigger them.'), + )}`, ) + output.print( + `Run ${chalk.cyan('sanity manage')} to open the management interface in your web browser, then go to the API section to turn off webhooks.`, + ) + output.print(`You can safely turn them back on after completing the migration.\n`) const response = flags.confirm && From f1353d6359f2df7363a1802d5adae35d49282082 Mon Sep 17 00:00:00 2001 From: Tommy Petty Date: Thu, 4 Apr 2024 15:43:24 -0400 Subject: [PATCH 3/3] fix(cli): update webhook message --- .../cli/commands/migration/runMigrationCommand.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts index 5717f79c14f..90944cd50b3 100644 --- a/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts +++ b/packages/sanity/src/_internal/cli/commands/migration/runMigrationCommand.ts @@ -180,14 +180,11 @@ const runMigrationCommand: CliCommandDefinition = { } output.print( - `\n${chalk.yellow( - chalk.bold('Note: If your dataset has active webhooks, migrations will trigger them.'), - )}`, + `\n${chalk.yellow(chalk.bold('Note: During migrations, your webhooks stay active.'))}`, ) output.print( - `Run ${chalk.cyan('sanity manage')} to open the management interface in your web browser, then go to the API section to turn off webhooks.`, + `To adjust them, launch the management interface with ${chalk.cyan('sanity manage')}, navigate to the API settings, and toggle the webhooks before and after the migration as needed.\n`, ) - output.print(`You can safely turn them back on after completing the migration.\n`) const response = flags.confirm &&