From 9f4a96f4328dc76441ca9f14fa265960ebf2b9d2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:37:03 -0700 Subject: [PATCH] Fix case where skip didn't save info --- src/prompts/runDown.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/prompts/runDown.ts b/src/prompts/runDown.ts index ed63713..d1b52bf 100644 --- a/src/prompts/runDown.ts +++ b/src/prompts/runDown.ts @@ -131,17 +131,14 @@ export function createRunDownPrompt(settings: Settings, appContext: Context, fil description: "skip until there are updates to the PR.", action: async (prompt) => { if (appContext.currentPull) { - let skipDate = appContext.skipped.get(appContext.currentPull.number); - if (skipDate === undefined) { - appContext.skipped.set(appContext.currentPull.number, Date.now()); - if (appContext.workArea) { - appContext.workArea.column.skippedCount++; - appContext.workArea.card.skipped = true; - } - appContext.screen.clearPull(); - appContext.screen.addPull(`[${appContext.workArea!.column.offset}/${appContext.workArea?.column.cards.length}] '${appContext.currentPull.title}' ${chalk.yellow("[skipped]")}.`); - saveSkipped(appContext.skipped); + appContext.skipped.set(appContext.currentPull.number, Date.now()); + if (appContext.workArea) { + appContext.workArea.column.skippedCount++; + appContext.workArea.card.skipped = true; } + appContext.screen.clearPull(); + appContext.screen.addPull(`[${appContext.workArea!.column.offset}/${appContext.workArea?.column.cards.length}] '${appContext.currentPull.title}' ${chalk.yellow("[skipped]")}.`); + saveSkipped(appContext.skipped); } await prompt.close(); }